当支持http和https时,Spring启动tomcat httpsession不一样

问题描述 投票:0回答:1

使用嵌入式tomcat和Spring启动时遇到HttpSession问题。方案如下:我使用spring boot启动tomcat,同时支持http和https。我的应用程序使用spring security saml来支持SAML登录。在调试期间,我发现saml / login&saml / sso无法获得相同的http会话。但是如果tomcat只支持http或https,则http会话是相同的。请帮忙。

谢谢

spring-boot tomcat httpsession
1个回答
0
投票

由于会话cookie被标记为安全,因此http请求将无法访问在https下创建的会话。

在http下创建的会话应该可以访问https请求。

© www.soinside.com 2019 - 2024. All rights reserved.