Sends a HTTP header to limit rendering of pages to same origin iframes.
Description
See also
Source
function send_frame_options_header() {
if ( ! headers_sent() ) {
header( 'X-Frame-Options: SAMEORIGIN' );
header( "Content-Security-Policy: frame-ancestors 'self';" );
}
}
Changelog
| Version | Description |
|---|---|
| 3.1.3 | Introduced. |
For those who would like to change this behavior, try using .htaccess instead of modifying this function directly, i.e.
Header always unset X-Frame-Options