简体   繁体   中英

how to set JSESSIONID cookie as secure using Spring security 2 and Apache Tomcat 7 setting

how to set JSESSIONID cookie as secure using Spring security 2 and Apache Tomcat 7 setting.

have put in the code below in web.xml and it deosn't seem to be working.

<cookie-config>
   <secure>true</secure>
</cookie-config>

thanks

Use the following:

<session-config>
  <cookie-config>
    <secure>true</secure>
    <http-only>true</http-only>
  </cookie-config>
</session-config>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM