yuluo-yx commented on issue #6314: URL: https://github.com/apache/shenyu/issues/6314#issuecomment-4169904462
感觉不是 Shenyu 在代理时主动删除了后端 Cookie,是 `v2.5.0` 版本的 shenyu 自身的 WebFlux/Security 会话机制和系统里的 `SESSION` 冲突了。`SESSION=; Max-Age=0; Expires=Thu, 01 Jan 1970 ...` 这种响应头像是 Spring WebFlux 在过期自己的 session cookie。 `v2.5.0` 的 `oauth2` 配置里启用了 WebFlux Security 过滤链,会访问 `exchange.getSession()`;如果浏览器把后端服务的 `SESSION` 一起带到网关,但网关本身没有对应 session,就可能在响应提交前回写一个删除 `SESSION` 的 `Set-Cookie`。所以会出现“直连后端正常,经过网关后 SESSION 被清掉”的情况。 看下是不是用了 Shenyu 的 `oauth2` 相关 starter 配置或者换个网关的 cookie 名字改掉试试。 @guoliang3 另外我觉得也升级到最新版本试试, -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
