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

DXP-7.4でCSPヘッダが動作しない

written-by

Kanchan Bisht

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

問題

  • 、アップデート90の機能フラグに存在するCSP機能との連携を試みているが、ページの編集ができず、読み込みが続くという問題が依然として発生している。
    1. コントロール・パネルに移動> インスタンス設定> 機能フラグ -> 有効 CSP
    2. コントロールパネル -> システム設定 -> コンテンツセキュリティポリシー -> ポリシーの追加
    3. こちら(コントロールパネル -> インスタンス設定 -> コンテンツセキュリティポリシー)に反映されます。
    4. サーバーを停止し、以下を追加する:「javascript.single.page.application.enabled=false" を portal-ext.properties ファイルに追加します。
    5. サーバーを再起動する。
  • 観察された動作 管理者ユーザーでログインし、編集アイコンをクリックしようとすると、読み込み中と表示され、コンソールブラウザのエラーが表示されます:
    Content-Security-Policy warnings 6
    Content-Security-Policy: The page’s settings blocked the loading of a resource at inline (“style-src-attr”). 2 combo:1:3389
    Content-Security-Policy: The page’s settings blocked the loading of a resource at inline (“style-src-attr”). combo:1:3575
    Uncaught SyntaxError: missing } after property list
    ecfdb78a-7281-06ba-8be2-4285b9ce2cb5:3318:12463note: { opened at line 3318, column 11935ecfdb78a-7281-06ba-8be2-4285b9ce2cb5:3318:11935
    Content-Security-Policy: The page’s settings blocked the loading of a resource at inline (“style-src-attr”). 2 ckeditor.js:100
    Content-Security-Policy: The page’s settings blocked the loading of a resource at inline (“style-src-attr”). ckeditor.js:95:231
    Content-Security-Policy: The page’s settings blocked the loading of a resource at inline (“style-src”). ckeditor.js:95:231
    Content-Security-Policy: The page’s settings blocked the loading of a resource at inline (“style-src-attr”). combo:1:1163

    Some cookies are misusing the recommended “SameSite“ attribute 2
    This page uses the non standard property “zoom”. Consider using calc() in the relevant property values, or using “transform” along with “transform-origin: 0 0”.

Environment

  • Liferay DXP 7.4

解決策

  • この機能はまだベータ・モード、つまりアクティブな開発中であり、本番使用の準備はできていない。 しかし、Liferayはこれらのベータ機能を、ユーザーがユースケースやビジネス目的に合わせてテスト・検証し、最終的に重要なフィードバックを提供できるようにしています。
    • こちらをご覧ください: ベータ機能
    • 従って、Liferayのサポートはベータ機能のインストール、設定、トラブルシューティングのサポートに限定されます。

追加情報

  • この件に関する詳細が必要な場合は、パッチの詳細を添付してサポートチケットをお送りください。
did-this-article-resolve-your-issue

legacy-knowledge-base