CORS requests for

Most of the The community site where WordPress code is created and shared by the users. This is where you can download the source code for WordPress core, plugins and themes as well as the central location for community conversations and organization. APIAPI An API or Application Programming Interface is a software intermediary that allows programs to interact with each other and share data in limited, clearly defined ways. endpoints accept CORS requests, but nginxNGINX NGINX is open source software for web serving, reverse proxying, caching, load balancing, media streaming, and more. It started out as a web server designed for maximum performance and stability. In addition to its HTTP server capabilities, NGINX can also function as a proxy server for email (IMAP, POP3, and SMTP) and a reverse proxy and load balancer for HTTP, TCP, and UDP servers. isn’t forwarding OPTIONS requests to these endpoints, when nginx considers it a “static” resource (ie. / and not /index.php)

$ curl -IsX OPTIONS | grep -Ei '^(HTTP|Access)'
HTTP/1.1 405 Not Allowed

$ curl -IsX OPTIONS | grep -Ei '^(HTTP|Access)'
HTTP/1.1 200 OK
Access-Control-Allow-Origin: *

This is causing problems for playground when making requests that include custom headers, as a preflight request needs to be made.

Would it be possible to redirect OPTIONS on “static” URIs to PHPPHP PHP (recursive acronym for PHP: Hypertext Preprocessor) is a widely-used open source general-purpose scripting language that is especially suited for web development and can be embedded into HTML. Looks like error_page 405 =200 $uri; would do it.


#prio3 #playground #cors