mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-22 17:18:32 +01:00
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. Built from https://develop.svn.wordpress.org/trunk@39044 git-svn-id: http://core.svn.wordpress.org/trunk@38986 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
b7e6c43c64
commit
dbc4b87b7f
@ -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.
|
||||
|
@ -4,7 +4,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.7-beta1-39043';
|
||||
$wp_version = '4.7-beta1-39044';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
Loading…
Reference in New Issue
Block a user