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

Liferay DXP 7.1はHTTPヘッダをサポートしていますか?

written-by

Sivakumar Perumal

knowledge-article-header-disclaimer-how-to

knowledge-article-header-disclaimer

legacy-article

learn-legacy-article-disclaimer-text

問題

  • Liferay DXP 7.1は以下のHTTPヘッダをサポートしていますか? "X-Frame-Options"、"X-XSS-Protection"、"X-Content-Type-Options "をサポートしていますか? そうでない場合、同じを有効にするために、アプリケーション側からどのような変更を行う必要があります。

環境

  • Liferay DXP 7.1

解決

  • Liferayポータルは、以下のヘッダーですでに保護されており、デフォルトで有効になっています。 Liferay DXP 7.1の system.properties に記載されています。
    #
    # Set this to true for the portal to send the "X-Frame-Options: DENY" HTTP
    # header to protect against clickjacking.
    #
    # Custom HTTP header values instead of "DENY" can be specified per URL via
    # the properties "http.header.secure.x.frame.options.*".
    #
    http.header.secure.x.frame.options=true
        #
    # Set this to nonempty value for the portal to send the "X-XSS-Protection"
    # HTTP header to block cross-site scripting attacks. Possible nonempty
    # values are "0", "1" and "1; mode=block"
    #
    http.header.secure.x.xss.protection=1
        #
    # Set this to true for the portal to send the "X-Content-Type-Options:
    # nosniff" HTTP header to protect against MIME sniffing. Custom URLs can
    # specified in the property
    # "http.header.secure.x.content.type.options.urls.excludes" that allow for
    # unhindered MIME sniffing.
    #
    http.header.secure.x.content.type.options=true
    以下のスクリーンショットをご参照ください。
    Http_Security_Headers.png
  • HTTP セキュリティヘッダはデフォルトで有効になっているので、同じものを有効にするためのアクションは必要ありません。

追加情報

did-this-article-resolve-your-issue

legacy-knowledge-base