Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Networking broken: CORS #1003

Closed
adamziel opened this issue Feb 6, 2024 · 2 comments
Closed

Networking broken: CORS #1003

adamziel opened this issue Feb 6, 2024 · 2 comments
Labels
[Aspect] Browser [Aspect] Networking [Type] Bug An existing feature does not function as intended

Comments

@adamziel
Copy link
Collaborator

adamziel commented Feb 6, 2024

Setting ?networking=yes no longer works as api.wordpress.org stopped returning the correct CORS headers. To reproduce, go to https://playground.wordpress.net/?php=8.0&wp=6.4&storage=none&networking=yes&url=/wp-admin/plugin-install.php

CleanShot 2024-02-06 at 10 20 16@2x

cc @dd32

@adamziel adamziel added [Type] Bug An existing feature does not function as intended [Aspect] Browser [Aspect] Networking labels Feb 6, 2024
@dd32
Copy link
Member

dd32 commented Feb 7, 2024

This appears to be because of 9f134e0, all requests are being made with a custom request header now which results in all requests having to make CORS preflight requests.

This goes back to #933 (comment)

Also worth noting if the requests go to /index.php instead of / it will pass.

$ curl -IsX OPTIONS https://api.wordpress.org/core/version-check/1.7/ | head -n1
HTTP/1.1 405 Not Allowed
$ curl -IsX OPTIONS https://api.wordpress.org/core/version-check/1.7/index.php | head -n1
HTTP/1.1 200 OK

I've followed up with systems and see about getting OPTIONS preflight requests working.

@adamziel
Copy link
Collaborator Author

adamziel commented Feb 8, 2024

Solved in #1010, let's keep discussing the Systems request in #1009

@adamziel adamziel closed this as completed Feb 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Aspect] Browser [Aspect] Networking [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

No branches or pull requests

2 participants