Skip to content

Domain name in multi-tier setups #272

Answered by johakoch
afflerbach asked this question in Q&A
Discussion options

You must be logged in to vote

Have a look at couper's run options/environment variables. The variable COUPER_ACCEPT_FORWARDED_URL configures, which X-Forwarded-* request headers modify the request variables url, origin, protocol, host, and port.

So in order to get the actual host name in request.host, set COUPER_ACCEPT_FORWARDED_URL=host and make sure that your SSL offloader sends the X-Forwarded-Host request header.

E.g. if the SSL offloader sends X-Forwarded-Host: www.example.com, request.host will be "www.example.com".

If you also want "https" in request.url, request.origin and request.protocol, set COUPER_ACCEPT_FORWARDED_URL=proto,host and let the SSL offloader send X-Forwarded-Proto as well.

In a local developme…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by afflerbach
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants