mirror of
https://github.com/WordPress/WordPress.git
synced 2024-06-29 00:04:58 +02:00
REST API: Add PATCH
to CORS allowed methods.
Editable resources in the REST API accept the `PATCH` method, but the CORS headers don't mention it. Props jnylen0. Fixes #38546. Built from https://develop.svn.wordpress.org/trunk@39042 git-svn-id: http://core.svn.wordpress.org/trunk@38984 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
d15f7b5f44
commit
69539eb2a7
|
@ -514,7 +514,7 @@ function rest_send_cors_headers( $value ) {
|
||||||
|
|
||||||
if ( $origin ) {
|
if ( $origin ) {
|
||||||
header( 'Access-Control-Allow-Origin: ' . esc_url_raw( $origin ) );
|
header( 'Access-Control-Allow-Origin: ' . esc_url_raw( $origin ) );
|
||||||
header( 'Access-Control-Allow-Methods: POST, GET, OPTIONS, PUT, DELETE' );
|
header( 'Access-Control-Allow-Methods: OPTIONS, GET, POST, PUT, PATCH, DELETE' );
|
||||||
header( 'Access-Control-Allow-Credentials: true' );
|
header( 'Access-Control-Allow-Credentials: true' );
|
||||||
header( 'Vary: Origin' );
|
header( 'Vary: Origin' );
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '4.7-beta1-39041';
|
$wp_version = '4.7-beta1-39042';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user