[wp-trac] [WordPress Trac] #52636: Add proper Cache-Control header to /wp-json REST endpoints
WordPress Trac
noreply at wordpress.org
Thu Jan 18 16:25:14 UTC 2024
#52636: Add proper Cache-Control header to /wp-json REST endpoints
-------------------------+-----------------------
Reporter: isaumya | Owner: (none)
Type: enhancement | Status: closed
Priority: normal | Milestone:
Component: REST API | Version:
Severity: major | Resolution: wontfix
Keywords: needs-patch | Focuses: rest-api
-------------------------+-----------------------
Comment (by TimothyBlynJacobs):
Developers should be returning a `WP_REST_Response` object from their
endpoint callback. The relevant docs can be found here:
https://developer.wordpress.org/rest-api/extending-the-rest-api/adding-
custom-endpoints/
--
Ticket URL: <https://core.trac.wordpress.org/ticket/52636#comment:11>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list