Last modified: 2014-04-15 14:26:03 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T46994, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 44994 - Enable CORS headers for accessing wikidata.org
Enable CORS headers for accessing wikidata.org
Status: RESOLVED WONTFIX
Product: Wikimedia
Classification: Unclassified
Wikidata (Other open bugs)
wmf-deployment
All All
: Low enhancement with 2 votes (vote)
: ---
Assigned To: Wikidata bugs
: ops
Depends on:
Blocks: 44948
  Show dependency treegraph
 
Reported: 2013-02-14 12:45 UTC by Yuri Astrakhan
Modified: 2014-04-15 14:26 UTC (History)
10 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Yuri Astrakhan 2013-02-14 12:45:28 UTC
Please enable CORS headers on wikidata to all other MW servers.

Would be a good way to allow for NavPopups to work on langlinks, etc.
Comment 1 jeblad 2013-02-14 17:31:31 UTC
A minor detail, this must be done on Wikipedia and it depends on some normalization of the domain names (that is subdomains) used at Wikidata.
Comment 2 Marius Hoch 2013-02-14 17:36:00 UTC
Requesting data from wikidata.org already works so this wont break wikibase deployment.

Changing product as this is no Wikibase problem but a MediaWiki configuration one.
Comment 4 Andre Klapper 2013-02-18 10:44:14 UTC
Hmm, maybe "shell" instead of "ops", seeing $wmgUseCORS in https://noc.wikimedia.org/conf/CommonSettings.php.txt ?
Comment 5 Andre Klapper 2013-10-31 12:15:01 UTC
[replacing wikidata keyword by adding CC - see bug 56417]
Comment 6 Magnus Manske 2014-04-02 13:47:30 UTC
Please also allow wmflabs.org servers.

Also, the cached entities should be available from all servers, e.g.:
https://www.wikidata.org/wiki/Special:EntityData/Q12345.json

This should actually reduce load to the wikidata servers, a many tools could then use the cached data instead of the API.
Comment 7 Daniel Kinzler 2014-04-02 14:08:53 UTC
(In reply to Magnus Manske from comment #6)
> Also, the cached entities should be available from all servers, e.g.:
> https://www.wikidata.org/wiki/Special:EntityData/Q12345.json

Note that the canonical URL of this would be https://www.wikidata.org/entity/Q12345.json, which triggers a chain of redirects to get you to the URL above. Note sure how CORS handles this.
Comment 8 Derk-Jan Hartman 2014-04-02 14:20:13 UTC
"Please also allow wmflabs.org servers."

That doesn't seem safe to me....

Anything that requires production level access should be on a production domain, not on a wmflabs domain.
Comment 9 Derk-Jan Hartman 2014-04-02 14:39:05 UTC
Oh and actually exposing resources for CORS (the json blobs) should be a separate bug request, it requires software changes.
Comment 10 Marius Hoch 2014-04-02 14:58:53 UTC
Closing this bug as it looks solved to me (please reopen with more details if I overlooked something).


(In reply to Magnus Manske from comment #6)
> Please also allow wmflabs.org servers.

This is not going to happen because wmflabs.org has a bazillion XSS security flaws which could then be used to perform CRSF attacks against Wikidata etc. This is not open for discussion.

(In reply to Derk-Jan Hartman from comment #9)
> Oh and actually exposing resources for CORS (the json blobs) should be a
> separate bug request, it requires software changes.

Yes, making the special page usable with JS from remote sites would require extra changes (this should go into a separate bug).

(In reply to Magnus Manske from comment #6)
> [...]
> This should actually reduce load to the wikidata servers, a many tools could
> then use the cached data instead of the API.

I can't remember any huge caching / performance differences between the two approaches offhand (except that SpecialEntityData sucks with XML). If there are such, open a bug for that.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links