문제

I have the following scenario: If I access my web application using HTTPs tomcat creates a secure JSESSIONID cookie - which is normal, so nothing wrong so far.

If I access http then tomcat creates a non-secure JSESSIONID cookie, which is also normal.

My problem is that when I access my web application using HTTP the cookie is created and right after that Spring Security (security:intercept-url pattern="/login.action" requires-channel="https"/>) sends me to an HTTPs connection. The problem is that the cookie remains as non-secure.

Do you know of any way to fix that? Is there any way to re-create the cookie using Spring Security?

Any help will be greatly appreciated!

Regards, user1532449

도움이 되었습니까?

해결책

Securing session cookies in Tomcat with httpOnly and secure=true

https://geekflare.com/secure-cookie-flag-in-tomcat/

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top