The default-src directive specifies the security policy for types of content that are not specifically defined by their own directives. This includes:
Valid host expressions can include:
https://*.report-uri.com Matches all subdomains of report-uri.com using the HTTPS scheme but not report-uri.com itself.
www.report-uri.com:443 Matches www.report-uri.com only on port 443 using any scheme.
https://report-uri.com:* Matches any port on report-uri.com using HTTPS.
The script-src directive specifies valid sources for JavaScript. This directive falls back to default-src if not specified. When either script-src or default-src are present the use of inline script and eval() is blocked without the addition of Unsafe Inline and Unsafe Eval respectively.
If you'd like to use different sources for script elements (script requests, script blocks) and attributes, use the respective section instead.
Valid host expressions can include:
https://*.report-uri.com Matches all subdomains of report-uri.com using the HTTPS scheme but not report-uri.com itself.
www.report-uri.com:443 Matches www.report-uri.com only on port 443 using any scheme.
https://report-uri.com:* Matches any port on report-uri.com using HTTPS.
The script-src-elem directive specifies valid sources for JavaScript in script elements (script requests, script blocks). This directive falls back to script-src (which in turn falls back to default-src) if not specified. When present, the use of inline script and eval() is blocked without the addition of Unsafe Inline and Unsafe Eval respectively.
If you'd like to use different sources for all scripts or just for attributes, use the respective section instead.
Valid host expressions can include:
https://*.report-uri.com Matches all subdomains of report-uri.com using the HTTPS scheme but not report-uri.com itself.
www.report-uri.com:443 Matches www.report-uri.com only on port 443 using any scheme.
https://report-uri.com:* Matches any port on report-uri.com using HTTPS.
The script-src-attr directive specifies valid sources for JavaScript in attributes like inline handlers. This directive falls back to script-src (which in turn falls back to default-src) if not specified. When present, the use of inline script and eval() is blocked without the addition of Unsafe Inline and Unsafe Eval respectively.
If you'd like to use different sources for all scripts or just for script elements, use the respective section instead.
Valid host expressions can include:
https://*.report-uri.com Matches all subdomains of report-uri.com using the HTTPS scheme but not report-uri.com itself.
www.report-uri.com:443 Matches www.report-uri.com only on port 443 using any scheme.
https://report-uri.com:* Matches any port on report-uri.com using HTTPS.
This will 'flatten' the script-src-elem and script-src-attr directives into the script-src directive, resulting in a simpler policy. Make sure you understand the impact this will have on your policy.
The style-src directive specifies valid sources for stylesheets. This directive falls back to default-src if not specified. When either style-src or default-src are present the use of inline <style> elements and HTML style attributes are disabled unless you specify Unsafe Inline.
If you'd like to use different sources for style elements and for inline attributes, use the respective section instead.
Valid host expressions can include:
https://*.report-uri.com Matches all subdomains of report-uri.com using the HTTPS scheme but not report-uri.com itself.
www.report-uri.com:443 Matches www.report-uri.com only on port 443 using any scheme.
https://report-uri.com:* Matches any port on report-uri.com using HTTPS.
The style-src-elem directive specifies valid sources for stylesheets, except for styles defined in attributes. This directive falls back to style-src (which falls back to default-src in turn) if not specified. When present, the use of inline <style> elements and HTML style attributes are disabled unless you specify Unsafe Inline.
If you'd like to use different sources for all styles or just for style attributes, use the respective section instead.
Valid host expressions can include:
https://*.report-uri.com Matches all subdomains of report-uri.com using the HTTPS scheme but not report-uri.com itself.
www.report-uri.com:443 Matches www.report-uri.com only on port 443 using any scheme.
https://report-uri.com:* Matches any port on report-uri.com using HTTPS.
The style-src-attr directive specifies valid sources for stylesheets in inline attributes. This directive falls back to style-src (which falls back to default-src in turn) if not specified. When present, the use of inline <style> elements and HTML style attributes are disabled unless you specify Unsafe Inline.
If you'd like to use different sources for all styles or just for style elements, use the respective section instead.
Valid host expressions can include:
https://*.report-uri.com Matches all subdomains of report-uri.com using the HTTPS scheme but not report-uri.com itself.
www.report-uri.com:443 Matches www.report-uri.com only on port 443 using any scheme.
https://report-uri.com:* Matches any port on report-uri.com using HTTPS.
This will 'flatten' the style-src-elem and style-src-attr directives into the style-src directive, resulting in a simpler policy. Make sure you understand the impact this will have on your policy.
The img-src directive specifies valid sources for images and favicons. This directive falls back to default-src if not specified.
Valid host expressions can include:
https://*.report-uri.com Matches all subdomains of report-uri.com using the HTTPS scheme but not report-uri.com itself.
www.report-uri.com:443 Matches www.report-uri.com only on port 443 using any scheme.
https://report-uri.com:* Matches any port on report-uri.com using HTTPS.
The font-src directive specifies valid sources for fonts loaded using @font-face. This directive falls back to default-src if not specified.
Valid host expressions can include:
https://*.report-uri.com Matches all subdomains of report-uri.com using the HTTPS scheme but not report-uri.com itself.
www.report-uri.com:443 Matches www.report-uri.com only on port 443 using any scheme.
https://report-uri.com:* Matches any port on report-uri.com using HTTPS.
The connect-src directive specifies valid sources for fetch, XMLHttpRequest, WebSocket and EventSource connections. This directive falls back to default-src if not specified.
Valid host expressions can include:
https://*.report-uri.com Matches all subdomains of report-uri.com using the HTTPS scheme but not report-uri.com itself.
www.report-uri.com:443 Matches www.report-uri.com only on port 443 using any scheme.
https://report-uri.com:* Matches any port on report-uri.com using HTTPS.
The media-src directive specifies valid sources for the <audio> and <video> elements. This directive falls back to default-src if not specified.
Valid host expressions can include:
https://*.report-uri.com Matches all subdomains of report-uri.com using the HTTPS scheme but not report-uri.com itself.
www.report-uri.com:443 Matches www.report-uri.com only on port 443 using any scheme.
https://report-uri.com:* Matches any port on report-uri.com using HTTPS.
The object-src directive specifies valid sources for the <object>, <embed> and <applet> elements. This directive falls back to default-src if not specified.
Valid host expressions can include:
https://*.report-uri.com Matches all subdomains of report-uri.com using the HTTPS scheme but not report-uri.com itself.
www.report-uri.com:443 Matches www.report-uri.com only on port 443 using any scheme.
https://report-uri.com:* Matches any port on report-uri.com using HTTPS.
The prefetch-src directive restricts the URLs from which resources may be prefetched or prerendered. This directive falls back to default-src if not specified.
Valid host expressions can include:
https://*.report-uri.com Matches all subdomains of report-uri.com using the HTTPS scheme but not report-uri.com itself.
www.report-uri.com:443 Matches www.report-uri.com only on port 443 using any scheme.
https://report-uri.com:* Matches any port on report-uri.com using HTTPS.
The child-src directive specifies valid sources for elements such as <frame> and <iframe>. This directive falls back to default-src if not specified.
Valid host expressions can include:
https://*.report-uri.com Matches all subdomains of report-uri.com using the HTTPS scheme but not report-uri.com itself.
www.report-uri.com:443 Matches www.report-uri.com only on port 443 using any scheme.
https://report-uri.com:* Matches any port on report-uri.com using HTTPS.
The frame-src directive specifies valid sources for elements such as <frame> and <iframe>. This directive falls back to child-src if not specified (which falls back to default-src in turn).
Valid host expressions can include:
https://*.report-uri.com Matches all subdomains of report-uri.com using the HTTPS scheme but not report-uri.com itself.
www.report-uri.com:443 Matches www.report-uri.com only on port 443 using any scheme.
https://report-uri.com:* Matches any port on report-uri.com using HTTPS.
The worker-src directive specifies valid sources for Worker, SharedWorker or ServiceWorker. This directive falls back to child-src if not specified.
Valid host expressions can include:
https://*.report-uri.com Matches all subdomains of report-uri.com using the HTTPS scheme but not report-uri.com itself.
www.report-uri.com:443 Matches www.report-uri.com only on port 443 using any scheme.
https://report-uri.com:* Matches any port on report-uri.com using HTTPS.
The frame-ancestors directive specifies parents that may embed a page using elements such as <frame> and <iframe>. It replaces the X-Frame-Options header.
Valid host expressions can include:
https://*.report-uri.com Matches all subdomains of report-uri.com using the HTTPS scheme but not report-uri.com itself.
www.report-uri.com:443 Matches www.report-uri.com only on port 443 using any scheme.
https://report-uri.com:* Matches any port on report-uri.com using HTTPS.
The form-action directive specifies locations that can be used for <form> submissions.
Valid host expressions can include:
https://*.report-uri.com Matches all subdomains of report-uri.com using the HTTPS scheme but not report-uri.com itself.
www.report-uri.com:443 Matches www.report-uri.com only on port 443 using any scheme.
https://report-uri.com:* Matches any port on report-uri.com using HTTPS.
This directive forces a user agent to load all assets over HTTPS, even if the URL specifies HTTP, when the page is loaded using HTTPS. It is ignored in a Report-Only policy.
This directive prevents a user agent from loading any assets using HTTP when the page is loaded using HTTPS. It is ignored in a Report-Only policy.
This directive ensures that a resource disowns its opener when navigated to.
The sandbox directive applies restrictions to a page including the prevention of popups, plugins, scripts and enforcing a same-origin policy.
The base-uri directive specifies URIs that a user agent may use as the documents base URL for relative URIs.
Valid host expressions can include:
https://*.report-uri.com Matches all subdomains of report-uri.com using the HTTPS scheme but not report-uri.com itself.
www.report-uri.com:443 Matches www.report-uri.com only on port 443 using any scheme.
https://report-uri.com:* Matches any port on report-uri.com using HTTPS.
The manifest-src directive specifies which manifest can be applied to the resource. This directive falls back to default-src if not specified.
Valid host expressions can include:
https://*.report-uri.com Matches all subdomains of report-uri.com using the HTTPS scheme but not report-uri.com itself.
www.report-uri.com:443 Matches www.report-uri.com only on port 443 using any scheme.
https://report-uri.com:* Matches any port on report-uri.com using HTTPS.
The plugin-type directive specifies the allowed plugins that the user agent may invoke.
The Report Only flag marks the CSP header in report only mode. The user agent will deliver violation reports but not enforce the policy. Used for testing purposes.
The report-uri directive specifies the URI that the user agent will POST a JSON formatted violation report to should the CSP be violated.
The report-to directive specifies a token that the user agent will use to lookup the reporting group in the report-to header.