W3cubDocs

/WordPress

apply_filters( ‘rest_exposed_cors_headers’, string[] $expose_headers, WP_REST_Request $request )

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

Parameters

$expose_headersstring[]
The list of response headers to expose.
$requestWP_REST_Request
The request in context.

Source

$expose_headers = apply_filters( 'rest_exposed_cors_headers', $expose_headers, $request );

Changelog

Version Description
6.3.0 The $request parameter was added.
5.5.0 Introduced.

© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/rest_exposed_cors_headers