Domain name in multi-tier setups #272
-
|
Is it somehow possible to access Couper's actual domain name even when operating in a multi-tier setup? So far I have: set_response_headers = {
Set-Cookie = "foo=bar; domain=${request.host}"
}This is fine unless I move Couper behind my SSL offloader as I then of course want the cookie to be set for the offloader's domain. Any suggestions? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
Have a look at couper's run options/environment variables. The variable So in order to get the actual host name in E.g. if the SSL offloader sends If you also want "https" in In a local development setup (without an SSL offloader), you don't set |
Beta Was this translation helpful? Give feedback.
Have a look at couper's run options/environment variables. The variable
COUPER_ACCEPT_FORWARDED_URLconfigures, whichX-Forwarded-*request headers modify the request variablesurl,origin,protocol,host, andport.So in order to get the actual host name in
request.host, setCOUPER_ACCEPT_FORWARDED_URL=hostand make sure that your SSL offloader sends theX-Forwarded-Hostrequest header.E.g. if the SSL offloader sends
X-Forwarded-Host: www.example.com,request.hostwill be "www.example.com".If you also want "https" in
request.url,request.originandrequest.protocol, setCOUPER_ACCEPT_FORWARDED_URL=proto,hostand let the SSL offloader sendX-Forwarded-Protoas well.In a local developme…