Summer ’26 では、Salesforce は生成されたコンテンツセキュリティポリシー (CSP) HTTP ヘッダーから不正な形式の URL を除外します。Spring ’25 以降、システム管理者は不正な形式の URL を信頼済み URL として保存できなくなりました。組織のリストに不正な形式の URL がある場合、それは 2025年2月より前にシステム管理者が追加したものです。信頼済み URL リストの正確性を保つために、不正な形式のエントリを削除してください。
Salesforce Classic では、あなたの名前をクリックし、[開発者コンソール] をクリックします。
Lightning Experience では、クイックアクセスメニュー (歯車アイコン) をクリックし、[開発者コンソール] をクリックします。
[Debug (デバッグ)] | [Open Execute Anonymous Window (匿名実行ウィンドウを開く)] に移動します。
実行ウィンドウに次の Apex コードを貼り付けます。
// Define a regex pattern that will match valid domain definitions.
Pattern validUrl = Pattern.compile(
'[A-Za-z0-9\'' + Pattern.quote('-._~:@!$&()*+,;%=/?#[]') + ']+');
// Fetch all CspTrustedSite for this org.
List<CspTrustedSite> cspTrustedSites = [
SELECT ID, EndpointUrl
FROM CspTrustedSite
];
// Loop over all CspTrustedSites and test if the URL is correct.
for(CspTrustedSite entry : cspTrustedSites) {
Matcher m = validUrl.matcher(entry.EndpointUrl);
// When the URL is not valid, print a debug message.
if(!m.matches()) {
System.debug(logginglevel.INFO, 'URL: ' + entry.EndpointUrl);
}
}
実行後に結果が自動的に表示されるように、[Open Log (ログを開く)] を選択します。
[Execute (実行)] をクリックします。
実行ログが開いたら、[Debug Only (デバッグのみ)] フィルターボックスを選択します。これにより、不正な形式の URL のみが表示されるようにリストがフィルタリングされます。
フィルタリングされたログに表示された不正な形式の URL のリストを確認します。
結果の完全なリストをエクスポートするには、ログファイルをダウンロードします。
[File (ファイル)] | [Download Log (ログをダウンロード)] をクリックします。
ダウンロードしたファイルをテキストエディタで開きます。
完全なログの中から不正な形式として特定された URL を見つけるには、USER_DEBUG プレフィックスを検索してください。
Salesforce ヘルプ: 開発者コンソールを開く
Salesforce ヘルプ: 信頼済み URL の管理
005317938

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.