このページはコミュニティーの尽力で英語から翻訳されました。MDN Web Docs コミュニティーについてもっと知り、仲間になるにはこちらから。

View in English Always switch to English

CSP: fenced-frame-src

Deprecated
To be removed

This feature is pending removal from browsers. Using it now may lead to broken functionality in future updates. Following the announcement that Chrome will maintain its current approach to third-party cookies, Chrome decided to withdraw certain Privacy Sandbox features including the <fencedframe> element and related APIs.

Experimental: これは実験的な機能です。
本番で使用する前にブラウザー互換性一覧表をチェックしてください。

HTTP の Content-Security-Policy (CSP) における fenced-frame-src ディレクティブは、ディレクティブは、 <fencedframe> 要素に読み込まれた、埋め込まれた閲覧コンテキストの有効なソースを指定します。

CSP バージョン 1
ディレクティブ種別 フェッチディレクティブ
代替 このディレクティブがない場合、ユーザーエージェントは frame-src ディレクティブを参照します(これは child-src ディレクティブが代替となります)。

構文

fenced-frame-src ポリシーには、 1 つ以上のソースが指定できます。

http
Content-Security-Policy: fenced-frame-src <source>;
Content-Security-Policy: fenced-frame-src <source> <source>;

ソース表現の値を空白で区切ったリストです。この種類のリソースは、指定されたソース表現のいずれかと一致した場合に読み込まれます。このディレクティブでは、以下のソース表現の値が適用できます。

違反の場合

以下の CSP ヘッダーを指定した場合、

http
Content-Security-Policy: fenced-frame-src https://example.com/

以下のソースはフェンスフレームに読み込まれません。

  • https://not-example.com/ (ドメインが一致しない)
  • https://example.org/ (TLD が一致しない)

仕様書

仕様書
Fenced Frame
# new-csp-directive

ブラウザーの互換性

関連情報