Issue
-
How to add the sameSite attribute as 'Strict' on the cookies
JSESSIONID,COOKIE_SUPPORT,GUEST_LANGUAGE_IDon JBoss EAP 7.2
Environment
- Liferay DXP 7.4
- JBoss EAP 7.2
Resolution
- In JBoss, navigate to
jboss/standalone/configuration/standalone.xml. - Edit
standalone.xmland add<session-cookie http-only="true" secure="true"/>to the existing code as shown below:
<servlet-container name="default">
<jsp-config/>
<session-cookie http-only="true" secure="true"/>
<websockets/>
</servlet-container>
3. Create a new file named undertow-handlers.conf using the code shown below and save it to the WEB-INF folder
samesite-cookie(mode=STRICT)
4. Restart the server.