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

Developer Studio から Liferay を実行すると、静的リソースの Cache-Control ヘッダーが見つからない

written-by

Gábor Komáromi

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

問題

  • Developer Studio からポータルを実行し、portal-ext.properties で com.liferay.portal.servlet.filters.header.HeaderFilter=true プロパティを設定しても、Cache-Control ヘッダーが静的リソースに存在しません。

Environment

  • Liferay DXP 7.1
  • Liferay Developer Studio

解決策

  • この問題は、Liferay Developer Studio で開発者モードがオンになっている場合に発生します。 これをオフにして、portal-ext.properties include-and-override=portal-developer.properties をコメントアウトすると、問題が解決します。
  • 開発者モードをオフにするには: [サーバー] ウィンドウで Liferay 7.x サーバーを選択します。 その概要で、Liferay Launch の下にある [開発者モードを使用する] のチェックを外します。

追加情報

  • 次のプロパティは、デフォルトで portal-developer.properties に設定されており、問題の原因となっています。
    com.liferay.portal.servlet.filters.header.HeaderFilter=false
did-this-article-resolve-your-issue

legacy-knowledge-base