Jboss 5. HttpOnly session cookies

2019-06-05 10:28发布

How to configure JBoss 5.1.* to make session cookie HttpOnly?

<Context useHttpOnly="true">

Doesn't work.

3条回答
该账号已被封号
2楼-- · 2019-06-05 10:52

Have you tried

<SessionCookie secure="true" httpOnly="true" />

as explained here.

查看更多
三岁会撩人
3楼-- · 2019-06-05 11:08

I'm using JBoss [EAP] 5.0.1 and adding

<SessionCookie secure="true" httpOnly="true" />

in <myJBossServerInstancePath>/deploy/jbossweb.sar/context.xml

<Context cookies="true" crossContext="true">
    <SessionCookie secure="true" httpOnly="true" />
    ...

works perfectly (thanks Luciano).

查看更多
我只想做你的唯一
4楼-- · 2019-06-05 11:08

Add

<SessionCookie secure="true" httpOnly="true" />

In $JBOSS_HOME/deploy/jbossweb.sar/context.xml

<Context cookies="true" crossContext="true">
   <SessionCookie secure="true" httpOnly="true" />

Make sure HTTPS/SSL configured in the server to work.

查看更多
登录 后发表回答