Commit 1ffab32
committed
Security: Set the
The `X-Frame-Options` HTTP response header is a way of controlling whether and how a document may be loaded inside of a child navigable. For sites using `Content-Security-Policy`, the `frame-ancestors` directive provides more granular control over the same situations.
Includes adding a `headers_sent()` check before sending the headers.
References:
* [https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/X-Frame-Options MDN Web Docs: X-Frame-Options header]
* [https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Content-Security-Policy/frame-ancestors MDN Web Docs: Content-Security-Policy: frame-ancestors directive]
Follow-up to [17826].
Props danielbachhuber, killerbishop, callumbw95, josephscott, nacin, chriscct7, iandunn, SergeyBiryukov.
Fixes #29429.
git-svn-id: https://develop.svn.wordpress.org/trunk@60657 602fd350-edb4-49c9-b593-d223f7449a82frame-ancestors directive in send_frame_options_header().1 parent 69a9d29 commit 1ffab32
1 file changed
+6
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7139 | 7139 | | |
7140 | 7140 | | |
7141 | 7141 | | |
7142 | | - | |
| 7142 | + | |
| 7143 | + | |
7143 | 7144 | | |
7144 | 7145 | | |
7145 | | - | |
| 7146 | + | |
| 7147 | + | |
| 7148 | + | |
| 7149 | + | |
7146 | 7150 | | |
7147 | 7151 | | |
7148 | 7152 | | |
| |||
0 commit comments