Forcing Tomcat to use secure JSESSIONID cookie over http

后端 未结 3 1808
礼貌的吻别
礼貌的吻别 2020-12-08 10:29

Is there a way to configure Tomcat 7 to create JSESSIONID cookie with a secure flag in all occasions?

Usual configuration results in Tomcat flagging session cookie

3条回答
  •  情话喂你
    2020-12-08 11:12

    In the end, contrary to my initial tests, web.xml solution worked for me on Tomcat 7.

    E.g. I added this snippet to web.xml and it marks session cookie as secure even when reverse proxy contacts tomcat over plain HTTP.

    
        
            true
            true
        
    
    

提交回复
热议问题