Support Forwarded
header (and perhaps others) for running behind a reverse proxy
#213
Labels
Forwarded
header (and perhaps others) for running behind a reverse proxy
#213
What is the crux of the problem you are trying to solve?
Lactoserv should be able to operated behind a reverse proxy, though it will need to be configurable whether it should operate that way.
Specifically, it needs to be able to recognize the
Forwarded
header when so configured, and use its info when constructing the correspondingRequest
object.What is the shape of the solution?
reverseProxy
configuration toProtocolWrangler
, which has sufficient semantics to define how to treatForwarded
(etc.) headers.Request
with replacement values; this may or may not involve actual additional logic in theRequest
constructor. For example, it might make sense to define a wrapper around the underlyingexpress.Request
/IncomingMessage
which "covers" things like.remoteAddress
andget('host')
, which would letRequest
blithely request the usual properties [waves hands].Is there a workaround?
Not really. This needs to be handled at the framework level.
Additional context
The
Forwarded
header is the most modern way to convey this info, but there are a fewX-
headers that are de facto standard and perhaps should be (configurable to be) honored.See these:
The text was updated successfully, but these errors were encountered: