WordPress.org

Make WordPress Core

Changeset 46544


Ignore:
Timestamp:
10/15/2019 03:45:39 PM (4 weeks ago)
Author:
whyisjake
Message:

REST API: Allow for multiple Vary: Origin headers in GET responses.

Simple fix, we pass false as the second parameter to the header function.

This is something that we added downstream of the 5.2.4 release, but we missed in 5.2/trunk.

Fixes #48309.
Props xknown, whyisjake.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/rest-api.php

    r46483 r46544  
    589589        header( 'Access-Control-Allow-Methods: OPTIONS, GET, POST, PUT, PATCH, DELETE' );
    590590        header( 'Access-Control-Allow-Credentials: true' );
    591         header( 'Vary: Origin' );
     591        header( 'Vary: Origin', false );
    592592    } elseif ( ! headers_sent() && 'GET' === $_SERVER['REQUEST_METHOD'] && ! is_user_logged_in() ) {
    593         header( 'Vary: Origin' );
     593        header( 'Vary: Origin', false );
    594594    }
    595595
Note: See TracChangeset for help on using the changeset viewer.