Feature summary (what you would like to be able to do and where):
I would like to be able to query the Phabricator Conduit API (https://phabricator.wikimedia.org/api/) directly via client-side JavaScript from tools hosted on https://*.toolforge.org and https://*.wmcloud.org. This requires the https://phabricator.wikimedia.org API to return a suitable Access-Control-Allow-Origin header.
Use case(s): wmcloud.org hosted dashboard > https://lingualibre.wmcloud.org/dashboard/supports
I am creating a central dashboard for Lingua Libre to showcase community-supporting edits, contributors, and activity from Commons, Meta, GitHub, and GitLab and Phabricator. The code for Phabricator panel should works but fails, being blocked by the lack of CORS from the API's server.
When attempting an XHR/Fetch request, the browser blocks the response:
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://phabricator.wikimedia.org/api/project.search... (Reason: CORS header ‘Access-Control-Allow-Origin’ missing). Status code: 200.
Sceenshot (with terminated token):
The server sends the data (Status 200), but the missing header prevents the browser from allowing the frontend to read it.
Benefits:
- Enables Toolforge and Cloud VPS projects to display real-time Phabricator activity and task status.
- Helps projects showcase activity for community engagement and WMF grant reporting.
- Brings Phabricator API accessibility in line with the MediaWiki Action API, which already supports cross-origin requests.
Notes
WMcloud.org's queries via the server-sides shell don't have the same rules and therefore succeed. Try $curl -i https://phabricator.wikimedia.org/api/project.search?api.token=api-SECRET-TOKEN&queryKey=active&constraints[ids][0]=6913 .
TOKEN : to get your token, go to your profile > Settings > Sessions and logs > Conduit API Tokens.
Proxy : For my own project, i just set up a ViteJS proxy, which solve my local situation.

