What is the purpose of this directive in the nginx forward proxy example? #3542
Unanswered
sevmonster
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have been streamlining my nginx config, and noticed that in the official forward proxy example
add_header
is used to send a cookie from theauth_request
back to the client. However, I do not see this utilized as far as my testing has gone with single application forward proxying. Is this used in domain-level forward proxying? When returning to the app subdomain from the authentik subdomain maybe, to make sure the right cookie is being set? Since in single application forward proxy configuration, the cookie is set by the outpost in its location block under the application subdomain, and in domain-level, you could be on a completely different TLD?The main reason I am even questioning this is to see if I can remove it from my configuration. I replaced
add_header
in the example with Headers More'smore_set_headers
, as I can't useadd_header
in such a place right now due to nginx config array inheritance. However it appears thatmore_set_headers
overwrites any upstreamSet-Cookie
headers, whereasadd_header
leaves them alone. I don't use domain-level proxying, so if that's the only case this cookie header is normally sent, I can safely remove it from my config to let my proxied cookies through.Beta Was this translation helpful? Give feedback.
All reactions