简体   繁体   English

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

[英]Spring boot tomcat httpsession is not same when support both http & https

I have HttpSession problem when using Embedded tomcat with Spring boot. 使用嵌入式tomcat和Spring启动时遇到HttpSession问题。 The scenario is as below: I start tomcat with spring boot, support both http & https. 方案如下:我使用spring boot启动tomcat,同时支持http和https。 my application using spring security saml to support SAML logon. 我的应用程序使用spring security saml来支持SAML登录。 During debug I found that saml/login & saml/sso can't get same http session. 在调试期间,我发现saml / login&saml / sso无法获得相同的http会话。 But if tomcat only support http or https, the http session is same. 但是如果tomcat只支持http或https,则http会话是相同的。 Please help. 请帮忙。

Thanks 谢谢

A session created under https will not be accessible to an http request because the session cookie is marked as secure. 由于会话cookie被标记为安全,因此http请求将无法访问在https下创建的会话。

A session created under http should be accessible to an https request. 在http下创建的会话应该可以访问https请求。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 春季启动-嵌入式Tomcat HTTP到HTTPS重定向 - Spring boot - Embeded Tomcat HTTP to HTTPS redirect Spring Boot / Tomcat:HTTP - > HTTPS 301重定向 - Spring Boot/Tomcat: HTTP -> HTTPS 301 Redirects Spring Boot 处理 http 和 HTTPS 请求 - Spring boot to handle both http and HTTPS requests 如何配置Spring Boot 2在两个端口(HTTP和HTTPS)上运行Tomcat? - How to configure Spring Boot 2 to run Tomcat on two ports (HTTP and HTTPS)? 创建 Tomcat 连接器会创建相同 Spring 启动应用程序的两个实例 - 从 HTTPS 启动应用程序时如何访问 HTTP 端点 - Creation of a Tomcat Connector Creates Two Instances of the Same Spring Boot App - How to access HTTP endpoint While Starting App from HTTPS 在相同的 Spring 启动应用程序中使用 Tomcat HTTP 和 Netty UDP - Using Tomcat HTTP and Netty UDP in same Spring Boot Application 解析 HTTP 请求头 HTTP 方法名称必须是带有 HTTPS spring Boot tomcat 的令牌时出错 - Error parsing HTTP request header HTTP method names must be tokens with HTTPS spring Boot tomcat 如何在 tomcat 9.0.14 的 Spring Boot REST 应用程序中同时启用 http1.1 和 http2.0 - How to enabled http1.1 and http2.0 both together in a spring boot REST application in tomcat 9.0.14 Spring Boot的Http和Https控制器 - Http and Https controllers with Spring Boot Spring Boot 将 HTTP 重定向到 HTTPS - Spring Boot redirect HTTP to HTTPS
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM