legacy-knowledge-base
公開されました Jun. 30, 2025

CDNを設定した後、Liferayが画像を読み込まず、ブラウザコンソールでエラーを投げる

written-by

Tímea Bihari

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環境にCDNを設定しました。
  • ポータルがLiferayのJS/CSSと画像をロードできず、ブラウザのコンソールにエラーが表示されます:
Access to XMLHttpRequest at 'https...(CDN)' from origin 'https...(liferay)' has been blocked by CORS policy. No 'Access-Control-Allow-Origin' header is present on the requested resource.

環境

  • Liferay DXP 7.4

解決策

  • Liferayからのアクセスを許可するには、CDNの設定でCross-Origin Resource Sharing (CORS)を有効にする必要があります。
  • CDNのプロバイダーから入手可能なリソースを参照してください。

追加情報

did-this-article-resolve-your-issue

legacy-knowledge-base