-
Notifications
You must be signed in to change notification settings - Fork 0
Directive: frame src
Ryan Parman edited this page Jun 14, 2024
·
10 revisions
The frame-src
directive specifies valid sources for nested browsing contexts loading HTML frame and iframe elements.
Note
frame-src
allows you to specify where iframes in a page may be loaded from. This differs from frame-ancestors, which allows you to specify what parent source may embed a page.
Required reading:
Accepts one or more schemes or hosts, the 'self'
keyword, or the 'none'
keyword.
frame-src 'none'
frame-src 'self'
frame-src example.com
frame-src example.com example.org
frame-src https://*.example.com
frame-src https:
✅ frame-src
will fallback to child-src
, which will fallback to default-src
if it is undefined.
-
CSP-0100 — [ERROR] directive
%s
has an invalid value%s
ABNF (CSP3)
directive-name = "frame-src"
directive-value = serialized-source-list
See ABNF: serialized-source-list
- source-list in CSP2
- serialized-source-list in CSP3
Content licensed under CC BY-SA.
- 🧪 Experimental, with limited support
⚠️ Important notes on usage- 🚫 Deprecated or obsolete
- base-uri
- block-all-mixed-content 🚫
- child-src
- connect-src
- default-src
- fenced-frame-src 🧪
- font-src
- form-action
- frame-ancestors
- frame-src
- img-src
- manifest-src
- media-src
- navigate-to 🚫
- object-src
- plugin-types 🚫
- prefetch-src 🚫
- referrer 🚫
- report-to 🧪
-
report-uri
⚠️ - require-trusted-types-for 🧪
- sandbox
- script-src-attr
- script-src-elem
- script-src
- style-src-attr
- style-src-elem
- style-src
- trusted-types 🧪
- upgrade-insecure-requests
- webrtc
- worker-src