[wp-trac] [WordPress Trac] #46992: Add a filter which allows the HTTP headers for REST API Endpoints to be changed
WordPress Trac
noreply at wordpress.org
Fri Apr 19 12:10:16 UTC 2019
#46992: Add a filter which allows the HTTP headers for REST API Endpoints to be
changed
-------------------------+-----------------------------
Reporter: sudar | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: REST API | Version: trunk
Severity: normal | Keywords: has-patch
Focuses: |
-------------------------+-----------------------------
Right now there is no way to modify the HTTP response headers for a REST
API Endpoint.
The HTTP headers for non REST API endpoint requests can be changed using
the `wp_headers` filter, but it won't work for REST Endpoints.
I am proposing to add a new filter called `wp_rest_headers` that allows
developers to override the HTTP Response headers of REST API Endpoints.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/46992>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list