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

In this article

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

VersionDescription
6.3.0The $request parameter was added.
5.5.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.