rest_exposed_cors_headers WordPress Filter Hook

The rest_exposed_cors_headers hook allows you to modify the headers that are exposed to the client when making a CORS request. This can be useful if you want to add or remove headers, or change the values of existing headers.

apply_filters( 'rest_exposed_cors_headers', string[] $expose_headers ) #

Filters the list of response headers that are exposed to REST API CORS requests.


Parameters

$expose_headers

(string[])The list of response headers to expose.


Top ↑

Source

File: wp-includes/rest-api/class-wp-rest-server.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
5.5.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.