docker里部署nginx,nginx端口80,zuul端口9090,用户服务端口8080
浏览器访问nginx静态资源login.html登录
form表单通过nginx和zuul进入后端的用户服务/user/login登录成功后response.addCookie,结果浏览器得到响应后没有收到cookie
直接访问zuul或者proxy_pass代理8080端口都没问题,nginx代理zuul后就拿不到了,请问是跨域的问题吗
这是nginx配置
upstream backup {
server 192.168.1.112:9090;
}
server {
listen 80;
server_name localhost;
#charset koi8-r;
#access_log /var/log/nginx/host.access.log main;
location / {
root /usr/share/nginx/html;
index index.html index.html;
}
location ~ ^/(user|goods|pay) {
proxy_pass http://backup;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_set_header X-Scheme $scheme;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_pass_header Server;
proxy_set_header Cookie $http_cookie;
}
}