legacy-knowledge-base
公開されました Jul. 2, 2025

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

投稿者

Christopher Lui

knowledge-article-header-disclaimer-how-to

knowledge-article-header-disclaimer

legacy-article

learn-legacy-article-disclaimer-text

説明

デフォルトでは、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