diff --git a/src/wp-includes/rest-api.php b/src/wp-includes/rest-api.php
index e6cdc3a..6344eff 100644
a
|
b
|
function rest_send_cors_headers( $value ) { |
525 | 525 | $origin = get_http_origin(); |
526 | 526 | |
527 | 527 | if ( $origin ) { |
528 | | header( 'Access-Control-Allow-Origin: ' . esc_url_raw( $origin ) ); |
| 528 | if ( 'null' !== $origin ) { |
| 529 | $origin = esc_url_raw( $origin ); |
| 530 | } |
| 531 | header( 'Access-Control-Allow-Origin: ' . $origin ); |
529 | 532 | header( 'Access-Control-Allow-Methods: OPTIONS, GET, POST, PUT, PATCH, DELETE' ); |
530 | 533 | header( 'Access-Control-Allow-Credentials: true' ); |
531 | 534 | header( 'Vary: Origin' ); |