Page MenuHomePhabricator

Origin 'http://...' is therefore not allowed access to query.wikidata.org
Closed, InvalidPublic

Description

Hello

I try to do a future lab for my students and I try to access via my web site to endpoint SPARQL : https://query.wikidata.org/bigdata/namespace/wdq/sparql

But I have the error message : No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://mywebsite' is therefore not allowed access. The response had HTTP status code 400.

So If it's a bug in the config, can you fix this problem ? else there are a process to subscribe to this service (with limitation I suppose...) ?

Thanks
Karima

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Karima updated the task description. (Show Details)
Karima changed Security from None to Access Request.
Karima edited subscribers, added: Karima; removed: Aklapper.

The response does have access-control-allow-origin:* so something seems to be not working right here.

jcrespo closed subtask Restricted Task as Invalid.Sep 9 2015, 6:52 PM
jcrespo removed a subtask: Restricted Task.

@Karima Do you see the origin header in the headers? Maybe some proxy on the way strips it?

@Smalyshev I have not proxy (I masked my address)

You can test this problem with any sparql editor. For example : http://openuplabs.tso.co.uk/demos/sparqleditor
And the error is the same :

XMLHttpRequest cannot load https://query.wikidata.org/bigdata/namespace/wdq/sparql. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://openuplabs.tso.co.uk' is therefore not allowed access. The response had HTTP status code 403.

OK, the problem there is that this tool does POST. Only GET is supported by the REST endpoint now, see https://www.mediawiki.org/wiki/Wikidata_query_service/User_Manual#SPARQL_endpoint

Smalyshev claimed this task.
Karima reopened this task as Open.EditedSep 10 2015, 6:49 PM

@Smalyshev
It"s a joke ? only Get ? SPARQL is a standard with rules !
http://www.w3.org/TR/sparql11-protocol/#protocol

The SPARQL endpoint has to support HTTP Get AND POST. (majority of editor use only post because the size of the query is not limited with post)

Sorry.

As I mentioned, POST is not supported right now. If you need POST support, please watch T112151. This issue is resolved since there is no issue with origins.