Welcome! Log In Create A New Profile

Advanced

Cookie_Path

Posted by Mangone 
Cookie_Path
August 04, 2022 07:28AM
Hello,
I'm looking for help on the configuration of openresty and more specifically nginx.
It is about nginx in the configuration of a reverse proxy.
Here is a part of the conf of my webapp.

server.xml

-->
<Connector port="8080" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" enableLookups="true" />

and here is the configuration of my nginx in endpoint-hmi1.

endpoint-hmi1.conf
location / {
proxy_pass http://xxxx.webapp/;
proxy_pass_header Set-Cookie ;
#proxy_cookie_domain ~\.([a-z]+\.[a-z]+)$ $1;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-NginX-Proxy true;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass_request_headers on;

I want to change the path of the cookie and I can't do it no matter what I do in debug mode, my path set-cookie=JSESSIONID =xxxxx; Path=hmi1; Httponly stays the same.
I wanted to modify this Path and I don't know how to do it.

Thanks for any help
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 82
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