Welcome! Log In Create A New Profile

Advanced

Cookie path with reverse proxy

Stefan Meier
March 14, 2019 12:40PM
I have three different applications running behind a NGINX reverse proxy.

They all have a login GUI, which uses the same authentication API.
Authentication is based on cookies.

My problem is now, that the path's of the cookies are set differently
depending on which GUI is used to login.

The authentication API, actually sets the cookie-path to /, but I assume it
is the NGINX proxy, which is overwriting that depending on the location to
/app or /admin.

Is there a way to set the path of the cookies to /, regardless which GUI is
used?

I appreciate any help.

This is how my configuration looks like:

http {
server {
listen 80;
server_name localhost;

location = / {
rewrite / /admin;
}

location /admin/ {
proxy_pass http://localhost:9001/;
}

location /app/ {
proxy_pass http://localhost:3100/;
}

location / {
proxy_pass http://localhost:3000/;
}
}}
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Cookie path with reverse proxy

Stefan Meier March 14, 2019 12:40PM

RE: Cookie path with reverse proxy

Reinis Rozitis March 14, 2019 01:50PM

Re: Cookie path with reverse proxy

Stefan Meier March 15, 2019 05:40AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 284
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready