legacy-knowledge-base
Publicado Jun. 25, 2030

Setting sameSite attribute in Cookie for header response on JBoss EAP 7.2

written-by

Anushka Tiwari

How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How To articles!

While we make every effort to ensure this Knowledge Base is accurate, it may not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with any feedback or concerns.

legacy-article

learn-legacy-article-disclaimer-text

Issue

  • How to add the sameSite attribute as 'Strict' on the cookies JSESSIONID,COOKIE_SUPPORT,GUEST_LANGUAGE_ID on JBoss EAP 7.2

Environment

  • Liferay DXP 7.4
  • JBoss EAP 7.2

Resolution

  1. In JBoss, navigate to jboss/standalone/configuration/standalone.xml.
  2. Edit standalone.xml and 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.

Additional Information

did-this-article-resolve-your-issue

legacy-knowledge-base