Page MenuHomePhabricator

Enable CORS on unauthenticated API requests
Closed, ResolvedPublic

Description

CORS support has been requested in previous related bugzilla bugs including bug 20814, bug 28700 and bug 20298.

The MediaWiki API could be used by third-party JavaScript tools a lot easier if it could return data cross-domain to Ajax users without them having to run proxies or use Flash/crossdomain.xml hacks and other such things.

The solution is simple: for HTTP GET-based, non-authenticated API requests, add the following header to the response.

Access-Control-Allow-Origin: *

More details about CORS:
http://enable-cors.org/
http://www.html5rocks.com/en/tutorials/file/xhr2/
http://www.w3.org/TR/cors/


Version: unspecified
Severity: enhancement

Details

Reference
bz30802

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 21 2014, 11:49 PM
bzimport set Reference to bz30802.
bzimport added a subscriber: Unknown Object (MLST).

This is exactly what bug 20814 is about. Marking as duplicate.

  • This bug has been marked as a duplicate of bug 20814 ***