Making WordPress.org


Ignore:
Timestamp:
04/01/2020 03:32:07 AM (7 years ago)
Author:
dd32
Message:

Plugin Directory: Locale Banner Caching: Only output a single Vary header, as we don't need CORS for this API endpoint.

See [9668].
See #3604.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/api/routes/class-locale-banner.php

    r9668 r9669  
    220220                $result->header( 'Cache-Control', 'max-age=3600' );
    221221
     222                // Don't output the Vary: Origin header, nginx doesn't like multiple Vary headers.
     223                // This also disables the Cross-Origin headers, but this API is only used by the same origin.
     224                remove_filter( 'rest_pre_serve_request', 'rest_send_cors_headers' );
     225
    222226                return $result;
    223227        }
Note: See TracChangeset for help on using the changeset viewer.