Sets a text that should be changed in the path attribute of the “Set-Cookie” header fields of a proxied server response. Suppose a proxied server returned the “Set-Cookie” header field with the attribute “path=/two/some/uri/”. The directive proxy_cookie_path /two/ /;
修改项目配置:
location /ckl {
proxy_pass http://localhost:8080/ckl/;
proxy_cookie_path /ckl /; #增加此行
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_redirect off;
proxy_read_timeout 60s;
proxy_connect_timeout 60s;
proxy_send_timeout 60s;
proxy_set_header X-Forwarded-Proto https;
proxy_intercept_errors on;
}重启nginx 解决
原文地址:http://blog.51cto.com/ckl893/2110936