There is a directive in nginx - proxy_cookie_domain which allows to REPLACE the domain. But my problem is how to ADD the domain substring into the proxied cookies? The backend unfortunately doesn't set this part of the cookie.
Asked
Active
Viewed 430 times
2
-
In that case browsers just use current domain. Why you want to change it? – Alexey Ten Oct 27 '15 at 18:20
-
Because I need to share cookies between several 3rd level domains to implement single session technique. – tigreavecdesailes Oct 27 '15 at 18:23
1 Answers
1
Coming very late to this. I needed to add a domain for pretty much the same reason.
The best I could find (as of Jun 2020) was this somewhat clumsy rule
proxy_cookie_path ~^(.+)$ "$1; domain=domain.com";
If anyone knows of a less dirty way of doing this, I'm all ears
daamsie
- 111
- 2