mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 14:20:15 +00:00
Move send_nosniff_header() into wp-includes so it can be used in wp-ajax.php. props sivel, fixes #12683
git-svn-id: https://develop.svn.wordpress.org/trunk@13806 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -4081,4 +4081,19 @@ function __return_true() {
|
||||
*/
|
||||
function __return_false() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Send a HTTP header to disable content type sniffing in browsers which support it.
|
||||
*
|
||||
* @link http://blogs.msdn.com/ie/archive/2008/07/02/ie8-security-part-v-comprehensive-protection.aspx
|
||||
* @link http://src.chromium.org/viewvc/chrome?view=rev&revision=6985
|
||||
*
|
||||
* @since 3.0.0
|
||||
* @return none
|
||||
*/
|
||||
function send_nosniff_header() {
|
||||
@header( 'X-Content-Type-Options: nosniff' );
|
||||
}
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user