diff --git a/src/wp-admin/admin-ajax.php b/src/wp-admin/admin-ajax.php index f284387945..6be4a87a13 100644 --- a/src/wp-admin/admin-ajax.php +++ b/src/wp-admin/admin-ajax.php @@ -24,6 +24,9 @@ require_once( dirname( dirname( __FILE__ ) ) . '/wp-load.php' ); /** Allow for cross-domain requests (from the front end). */ send_origin_headers(); +header( 'Content-Type: text/html; charset=' . get_option( 'blog_charset' ) ); +header( 'X-Robots-Tag: noindex' ); + // Require an action parameter if ( empty( $_REQUEST['action'] ) ) { wp_die( '0', 400 ); @@ -35,9 +38,6 @@ require_once( ABSPATH . 'wp-admin/includes/admin.php' ); /** Load Ajax Handlers for WordPress Core */ require_once( ABSPATH . 'wp-admin/includes/ajax-actions.php' ); -header( 'Content-Type: text/html; charset=' . get_option( 'blog_charset' ) ); -header( 'X-Robots-Tag: noindex' ); - send_nosniff_header(); nocache_headers();