如何在泽西岛将xsrf-token cookie的HttpOnly标志设置为true?

How to set the HttpOnly flag to true for xsrf-token cookie in jersey?

提问人:andreiiz 提问时间:4/11/2023 更新时间:4/11/2023 访问量:144

问:

我正在尝试在我的球衣应用程序中将 xsrf-token cookie 的 HttpOnly 标志设置为 true。 目前我有两个 cookie,jsession id cookie 的 HttpOnly 标志设置为 true,而另一个设置为 false。

我在我的web.xml中有这个:

  <session-config>
<session-timeout>30</session-timeout>
<cookie-config>
    <http-only>true</http-only>
    <secure>true</secure>
</cookie-config>
<tracking-mode>COOKIE</tracking-mode>

但是 xsrf cookie HttpOnly 标志始终为 false。 如何更改该cookie的标志?

java cookies 泽西岛 x-xsrf-token

评论


答: 暂无答案