You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A <code>CSP</code> request header is now sent with relevant requests, as
538
-
described in <ahref="#csp-request-header">§3.4 The CSP HTTP Request Header</a>.
539
-
540
-
541
-
542
534
<li>
543
535
A <codeclass="idl"><adata-link-type="idl" href="#securitypolicyviolationevent">SecurityPolicyViolationEvent</a></code> is fired upon violations, as described
544
536
in <ahref="#firing-securitypolicyviolationevent-events">§6.3 Firing Violation Events</a>.
<ahref="#content-security-policy-report-only-header-field">§3.2 Content-Security-Policy-Report-Only Header Field</a>) or an HTML
815
807
<code><adata-link-type="element" href="http://www.w3.org/TR/html5/document-metadata.html#the-meta-element">meta</a></code> element (defined in <ahref="#delivery-html-meta-element">§3.3 HTML meta Element</a>).</p>
816
808
817
-
818
-
<p>Servers are informed that requests are coming from a <adata-link-type="dfn" href="#protected-resource">protected resource</a>
819
-
via an HTTP request header (defined in <ahref="#csp-request-header">§3.4 The CSP HTTP Request Header</a>).</p>
<pclass="note" role="note">Note: A <adata-link-type="dfn" href="#security-policy">policy</a> specified via a <code><adata-link-type="element" href="http://www.w3.org/TR/html5/document-metadata.html#the-meta-element">meta</a></code> element will be enforced
1036
1024
along with any other policies active for the protected resource, regardless
1037
1025
of where they’re specified. The general impact of enforcing multiple
1038
-
policies is described in <ahref="#enforcing-multiple-policies">§3.5 Enforcing multiple policies.</a>.</p>
1026
+
policies is described in <ahref="#enforcing-multiple-policies">§3.4 Enforcing multiple policies.</a>.</p>
<p>The <code><dfndata-dfn-type="dfn" data-noexport="" id="csp">CSP<aclass="self-link" href="#csp"></a></dfn></code> header field indicates that a particular
1061
-
request is subject to a <adata-link-type="dfn" href="#security-policy">policy</a>, and its value is defined by the
<p>If the user agent is <adata-link-type="dfn" href="#monitor">monitoring</a> or <adata-link-type="dfn" href="#enforce">enforcing</a> a <adata-link-type="dfn" href="#security-policy">policy</a>
1074
-
that includes directives whose value is a <adata-link-type="dfn" href="#source-list">source list</a>, then the user
1075
-
agent MUST send a header field named <code>CSP</code> along with requests
1076
-
for resources whose <adata-link-type="dfn" href="#origin">origin</a><em>does not</em> match the <adata-link-type="dfn" href="#protected-resource">protected
1077
-
resource</a>’s origin. The value of this header MUST be <code>active</code>.</p>
1078
-
1079
-
1080
-
1081
-
<p>The user agent MAY choose to send this header only if the request is for a
1082
-
resource type which the active policy would effect. That is, given a policy
1083
-
of <code>img-src example.com</code>, the user agent would send <code>CSP:
1084
-
active</code> along with requests for images, but might choose not to send
1085
-
the header with requests for script.</p>
1086
-
1087
-
1088
-
1089
-
<pclass="note" role="note">Note: The central reason for including this header is that it hints to a
1090
-
server that information about redirects might be leaked as a side-effect
1091
-
of a page’s active policy. If this header is present, a server might decline
1092
-
to redirect a logged-out user from <code>example.com</code> to
1093
-
<code>accounts.example.com</code>, for example, as a malicious embedder
1094
-
might otherwise be able to determine the user’s logged-in status.</p>
0 commit comments