REST API – CSRF
-
Hi,
I want to build an endpoint but restrict the front end to the originating site, because the back end is accessing an ‘expensive’ API.
Can anyone elaborate on
but if you wish to prevent your site from being accessed from unknown origins you may unhook the default rest_send_cors_headers function from the rest_pre_serve_request filter hook, then hook in your own function to that same filter to specify stricter CORS headers.
TIA
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
The topic ‘REST API – CSRF’ is closed to new replies.