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

LiferayDXPのHTTPリクエストとレスポンスに特定のセキュリティヘッダが含まれていない理由

written-by

Prarthana Jadhav

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

問題

  • 以下のヘッダーがLiferayにはありません。
    1. X-Content-Type-Options" ヘッダ
    2. ”X-XSS Protection”ヘッダ
    3. X-Frame-Options "ヘッダ
    4. Content-Security-Policy "ヘッダ
    5. Strict-Transport-Security "ヘッダ
    6. cross-origin resource sharing(CORS)
    7. P”Public-Key-Pins” ヘッダ

環境

  • Liferay DXP 7.0-7.3

解決

  • 以下のヘッダーは、リクエストのいずれかを検査するときにデフォルトで使用可能です。
    1. "X-Content-Type-Options" ヘッダ
    2. "X-XSSProtection" ヘッダ
    3. "X-Frame-Options" ヘッダ Screenshot_from_2020-01-28_17-22-27.png
  • 残りのヘッダについて
    1. "Content-Security-Policy" ヘッダ:Liferay Portalは、CSPディレクティブを設定するための設定/UIがないという意味で、CSPを直接サポートしていません。しかし、CSPディレクティブは自分で追加することができます(例えば、Webサーバーやテーマを経由して)。  Content Security Policy (CSP)の記事は、これを実現するのに役立つかもしれません。
    2. "Strict-Transport-Security" ヘッダ:この設定は、TomcatなどのApplication Server側(Liferay側ではなく)で行う必要があります。 Enabling HTTP Strict Transport Security (HSTS) の記事は、これを実現するのに役立つかもしれません。
    3. "Cross-origin resource sharing (CORS)"ヘッダ:Cross-Origin Resource Sharingは、Liferayの設定では管理されません。以下の記事には、CORSを有効にするために使用できるいくつかの役立つ情報とWebサーバー構成の例が含まれています。
    4. "Public-Key-Pins" ヘッダ:この設定はWebサーバで行う必要があります。 この記事:HTTP Public Key Pinning (HPKP)  はPublic-key-pinsを有効にするのに役立つかもしれません。

追加情報

ご注意:上記のハイパーリンク先の記事は、基本情報に共有されている非公式の記事です。 これらの記事の使用は、完全にあなたの裁量に委ねられています。

4から7までのヘッダは、アプリケーション・サーバまたはWebサーバで設定する必要があり、どちらのプラットフォームもLiferayサポートの範囲外となります。

did-this-article-resolve-your-issue

legacy-knowledge-base