WordPress.org

Make WordPress Core

Ticket #36390: 36390.2.diff

File 36390.2.diff, 634 bytes (added by rachelbaker, 4 years ago)
  • src/wp-includes/rest-api/class-wp-rest-server.php

     
    226226        public function serve_request( $path = null ) {
    227227                $content_type = isset( $_GET['_jsonp'] ) ? 'application/javascript' : 'application/json';
    228228                $this->send_header( 'Content-Type', $content_type . '; charset=' . get_option( 'blog_charset' ) );
     229                $this->send_header( 'X-Robots-Tag', 'noindex' );
    229230
    230231                /*
    231232                 * Mitigate possible JSONP Flash attacks.