Welcome! Log In Create A New Profile

Advanced

Proxy domain rewrite using proxy_cookie_domain

February 12, 2016 02:22PM
I want to rewrite domains in the cookie when NGIX is acting as reverse proxy. I see that NGIX support this using proxy_cookie_domain module.

But I am unable to find out where does it keep the original domain which is being replaced? In my opinion NGIX would need the original domain to find out where to send the cookie when it comes back to NIGX in next request.

Let's says NGIX domain is: external.com
backend server #1 sets cookie domain as: server1.com
backend server #2 sets cookie domain as: server2.com

Both these domains are replaced by NGIX to NGIX's domain so both cookies' domain is now external.com

when the request comes to NGIX, both these cookies will be sent by browser to NGIX, now how does NGIX decide which cookies to be sent to the backend server? it needs to keep the original domain mapping to find this how, does it keep somewhere?

please help in answering this question.
Subject Author Posted

Proxy domain rewrite using proxy_cookie_domain

nitin February 12, 2016 02:22PM

Re: Proxy domain rewrite using proxy_cookie_domain

Maxim Dounin February 12, 2016 08:56PM

Re: Proxy domain rewrite using proxy_cookie_domain

nitin February 15, 2016 01:29AM

Re: Proxy domain rewrite using proxy_cookie_domain

Maxim Dounin February 15, 2016 08:08AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 79
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready