Experience Cloud のエクスペリエンスビルダーで [リソースにアクセスできません。] というエラーが表示された場合の対処方法を説明します。
警告本文はそれぞれ以下のとおりで、2 種類あり、対処方法はそれぞれ異なります。
スクリプトリソースのhttps://example.com/example.jsへのアクセスはエクスペリエンスビルダーサイトのコンテンツセキュリティポリシー (CSP) に違反します。スクリプトリソースへのアクセスを許可するには、エクスペリエンスビルダーの [設定] | [セキュリティ] でサイトのセキュリティレベルを変更してください。次に、ホストを信頼されるホストのリストに追加します。
未承認の外部ホストからリソースへのアクセスはコンテンツセキュリティポリシー (CSP) に違反します。このリソースへのアクセスを許可するには、Salesforce の [設定] の [信頼済み URL] でホストを信頼されるホストのリストに追加してください。詳細はこちら
この警告は、コンテンツセキュリティポリシー (CSP) に違反し、ブロックされたアクセスがあった場合に表示されます。
ブロックされたアクセスを CSP に違反しないように設定するためには、以下の設定を行います。
ヘルプ「エクスペリエンスビルダーサイトでのセキュリティレベルの選択」を参考に、[スクリプト用の信頼済みサイト] を追加します。
ヘルプ「信頼済み URL の管理」を参考に、信頼済み URL に CSP に違反した URL および CSP ディレクティブを追加します。
警告表示の [CSP 違反を表示しない] にチェックを入れて [OK] をクリックすると、その後はこちらの警告は表示されなくなります。
警告を再度表示させたい場合は、Cookie の削除をお試しください。
具体的な Cookie の削除手順は以下のナレッジをご参照ください。
Cookie を削除した場合は、ログイン情報が削除され、再度ログインが必要になる場合や、Cookie に保存された設定がクリアされる可能性があるためご注意ください。
警告を再度表示させる状態にした場合でも、CSP が発生しない状態の場合は、警告は表示されません。
005132485

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.