REST API: Allow Content-Type on CORS requests.

This allows `POST` requests with a wider variety of `Content-Type' headers - `Content-Type: application/json`, for example.

Props jnylen0.
Fixes #37994.



git-svn-id: https://develop.svn.wordpress.org/trunk@39044 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Gary Pendergast 2016-10-31 00:33:25 +00:00
parent b5a4df509e
commit 7dad21f34c
1 changed files with 1 additions and 1 deletions

View File

@ -240,7 +240,7 @@ class WP_REST_Server {
*/
$this->send_header( 'X-Content-Type-Options', 'nosniff' );
$this->send_header( 'Access-Control-Expose-Headers', 'X-WP-Total, X-WP-TotalPages' );
$this->send_header( 'Access-Control-Allow-Headers', 'Authorization' );
$this->send_header( 'Access-Control-Allow-Headers', 'Authorization, Content-Type' );
/**
* Send nocache headers on authenticated requests.