cheneydog
V2EX  ›  问与答

用 nginx proxy_pass 代理的服务出现会话混乱的情况。

  •  
  •   cheneydog · Jan 23, 2019 · 1081 views
    This topic created in 2676 days ago, the information mentioned may be changed or developed.
    服务是开源项目,好几个都会出现,应该不是别人的服务的问题。

    症状为,刷新后用户变成别人了。这几个服务都是直接出页面的,不是前后端分离模式。

    帮我看看是什么机制触发了这个问题。

    配置:

    ```
    location / {
    index index.html index.htm;
    proxy_pass http://xxx:8008/;

    proxy_set_header Cookie $http_cookie;
    proxy_set_header Host $host:$server_port;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

    client_max_body_size 100m;
    client_body_buffer_size 256k;
    proxy_connect_timeout 15;

    }

    ```
    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1185 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 30ms · UTC 18:06 · PVG 02:06 · LAX 11:06 · JFK 14:06
    ♥ Do have faith in what you're doing.