mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2025-10-16 12:05:38 +00:00
Administration: In admin-ajax.php, send X-Robots-Tag header earlier, so that it applies before wp_die() when no action parameter was provided.
Props robi-bobi, harryfear, garrett-eclipse. Fixes #47711. git-svn-id: https://develop.svn.wordpress.org/trunk@45650 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
8df86efc2b
commit
ceeb99ecbc
@ -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();
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user