Rest Api returns empty 200 ok
-
Hey, there is an issue with the plugin site.com/wp-json does not work when doing client-side requests.
doing fetch(“site.com/wp-json) on the client side returns 200 OK with empty response text but doing the same server-side works fine
this is the request raw when the plugin is on
HTTP/1.1 200 OK
Date: Sun, 27 Jul 2025 16:21:03 GMT
Server: Apache
cf-edge-cache: no-cache
Content-Encoding: gzip
Vary: Accept-Encoding
Cache-Control: max-age=2592000
Expires: Tue, 26 Aug 2025 16:21:03 GMT
Referrer-Policy: no-referrer-when-downgrade
Keep-Alive: timeout=100
Connection: Keep-Alive
Transfer-Encoding: chunked
Content-Type: text/html; charset=UTF-8when the plugin is off
HTTP/1.1 200 OK
Date: Sun, 27 Jul 2025 16:22:27 GMT
Server: Apache
cf-edge-cache: no-cache
X-Robots-Tag: noindex
X-Content-Type-Options: nosniff
Access-Control-Expose-Headers: X-WP-Total, X-WP-TotalPages, Link
Access-Control-Allow-Headers: Authorization, X-WP-Nonce, Content-Disposition, Content-MD5, Content-Type
X-WP-Nonce: xxxx
X-WP-Total: 306
X-WP-TotalPages: 31
Link: xxxxxx/wp-json/wp/v2/users?_locale=user&page=2; rel="next"
Allow: GET, POST
Expires: Wed, 11 Jan 1984 05:00:00 GMT
Cache-Control: no-cache, must-revalidate, max-age=0, no-store, private
Content-Encoding: gzip
Vary: Accept-Encoding
Referrer-Policy: no-referrer-when-downgrade
Keep-Alive: timeout=100
Connection: Keep-Alive
Transfer-Encoding: chunked
Content-Type: application/json; charset=UTF-8
The topic ‘Rest Api returns empty 200 ok’ is closed to new replies.