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

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.

問題

  • 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