legacy-knowledge-base
公開されました Jun. 30, 2025

JBoss EAP 7.2でヘッダーレスポンスのCookieにsameSite属性を設定する

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

問題

  • クッキーに sameSite 属性を 'Strict' として追加する方法 JSESSIONID,COOKIE_SUPPORT,GUEST_LANGUAGE_ID JBoss EAP 7.2

環境

  • Liferay DXP 7.4
  • JBoss EAP 7.2

解像度

  1. JBoss で、 jboss/standalone/configuration/standalone.xmlに移動します。
  2. standalone.xml を編集し、 <session-cookie http-only="true" secure="true"/> を以下のように既存のコードに追加する:
<servlet-container name="default">
<jsp-config/>
<session-cookie http-only="true" secure="true"/>
<websockets/>
</servlet-container>


3. undertow-handlers.conf という新しいファイルを以下のコードで作成し、 WEB-INF フォルダに保存する。

samesite-cookie(mode=STRICT)

4. サーバーを再起動する。

追加情報

did-this-article-resolve-your-issue

legacy-knowledge-base