Legacy Knowledge Base
公開されました Jul. 2, 2025

クッキーの設定のhttpOnlyステータス

Written By

Christopher Lui

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

You are viewing an article from our legacy "FastTrack" publication program, made available for informational purposes. Articles in this program were published without a requirement for independent editing or verification and are provided"as is" without guarantee.

Before using any information from this article, independently verify its suitability for your situation and project.

説明

デフォルトでは、Liferayプラットフォームは、そのportal.propertiesファイル(Liferay 6.2以前)またはsystem.propertiesファイル(Liferay 7.0以降)で、すべてのクッキーを httpOnly true に設定します。

    #
    # HTTP only cookies are not supposed to be exposed to client-side scripting
    # code, and may therefore help mitigate certain kinds of cross-site
    # scripting attacks. Input a list of comma delimited cookie names that are
    # not HTTP only.
    #
    cookie.http.only.names.excludes=

決議

特定のクッキーを httpOnly true から除外して httpOnly false にしたい場合は、system-ext.properties ファイルの前述のプロパティを使用して、名前でリストアップすることができます。 system-ext.propertiesファイルをデプロイしたLiferayウォーの/WEB-INF/classesディレクトリに配置し、Liferayを再起動します。 Liferayの/WEB-INF/クラスは、アプリケーションサーバーにデプロイされている場所であればどこでも見つけることができます。 例えばTomcatを使用している場合は、tomcat-{version} /webapps/ROOT/WEB-INF/classesにあります。

プロパティが読み込まれているかどうかを確認するには、 コントロール パネル > サーバー管理 > プロパティ にアクセスして、追加したプロパティを検索します。

追加情報

Did this article resolve your issue ?

Legacy Knowledge Base