$this->
send_header( 'X-Content-Type-Options', 'nosniff'
);
/**
* Filters whether to send nocache headers on a REST API request.
*
* @since 4.4.0
*
* @param bool $rest_send_nocache_headers Whether to send no-cache headers.
*/
$send_no_cache_headers =
apply_filters( 'rest_send_nocache_headers',
is_user_logged_in() );
if ( $send_no_cache_headers ) { foreach ( wp_get_nocache_headers() as $header =>
$header_value ) { if ( empty( $header_value ) ) { $this->
remove_header( $header );
} else { $this->
send_header( $header,
$header_value );
} } } /**
* Filters whether the REST API is enabled.
*
* @since 4.4.0
* @deprecated 4.7.0 Use the {@see 'rest_authentication_errors'} filter to
* restrict access to the REST API.
*
* @param bool $rest_enabled Whether the REST API is enabled. Default true.
*/