之前配置nginx的时候遇到过cookie丢失了,但是又想不起来了,后来查到了就记一下吧:
location / {
proxy_pass http://127.0.0.1:8080;
proxy_set_header Host $host:$server_port;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Real-PORT $remote_port;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Cookie $http_cookie;
}
这里记录一下,省的以后再忘了。