MatmaRex / patchdemo

This repository has been moved to GitLab: https://gitlab.wikimedia.org/repos/ci-tools/patchdemo
https://gitlab.wikimedia.org/repos/ci-tools/patchdemo
MIT License
25 stars 21 forks source link

api.php: add CORS header #563

Closed hashar closed 1 year ago

hashar commented 1 year ago

We need the API to emit Access-Control-Allow-Origin: * to allow downstream usage in JavaScript application. For example the integration with https://gerrit.wikimedia.org/. Without it, the browser complains with:

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://patchdemo.wmflabs.org/api.php?action=findwikis&change=922162. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing).

Part of #285 Follow-up #537

Bug: https://phabricator.wikimedia.org/T332474

edg2s commented 1 year ago

Deployed.