This list of sites that accept CORS requests will be very helpful when dealing with cross-wiki requests via ForeignApi. Instead of catching failed requests, user-script and gadget developers can decide whether they can make a request in the first place, and significantly improve user experience and expectations from the actions. For example, my gadget can already display diffs and revisions from linked interwikis, but only in controlled spaces like Wikidata edits in the watchlist, global watchlist and global user contributions. I want to expand these actions for all links, including user-contributed content, but I don't have a list of servers where these requests will work reliably. Thanks.
Description
Details
| Subject | Repo | Branch | Lines +/- | |
|---|---|---|---|---|
| api: Expose $wgCrossSiteAJAXdomains via siteinfo API | mediawiki/core | master | +17 -0 |
Event Timeline
For example, my gadget can already display diffs and revisions from linked interwikis, but only in controlled spaces like Wikidata edits in the watchlist, global watchlist and global user contributions. I want to expand these actions for all links, including user-contributed content, but I don't have a list of servers where these requests will work reliably.
Same here. Basically all user scripts that operate on a wiki family and make nondeterministic cross-wiki calls, taking advantage of mw.ForeignApi, would be happy to know in advance which domains within the same wiki family are accessible.
Thank you for tagging this task with good first task for Wikimedia newcomers!
Newcomers often may not be aware of things that may seem obvious to seasoned contributors, so please take a moment to reflect on how this task might look to somebody who has never contributed to Wikimedia projects.
A good first task is a self-contained, non-controversial task with a clear approach. It should be well-described with pointers to help a completely new contributor, for example it should clearly point to the codebase URL and provide clear steps to help a contributor get set up for success. We've included some guidelines at https://phabricator.wikimedia.org/tag/good_first_task/ !
Thank you for helping us drive new contributions to our projects <3
Change #1264971 had a related patch set uploaded (by Reeti; author: Reeti):
[mediawiki/core@master] api: Expose $wgCrossSiteAJAXdomains via siteinfo API
Hi! I've been working on this task and have submitted a patch that adds a new crosssiteajaxdomains siprop to ApiQuerySiteinfo, exposing $wgCrossSiteAJAXdomains via the siteinfo API. The implementation follows the same pattern as copyuploaddomains, includes i18n strings in en.json and qqq.json, and adds a PHPUnit test.
I'd really appreciate any feedback or suggestions. Thank you so much for your time!
Hi, just a gentle ping on this patch. Please let me know if you have any feedback or if there are any changes I need to make. Thank you!