elf-pavlik created this task. elf-pavlik added a project: Wikidata. Herald added a subscriber: Aklapper. |
I work on developing few new Solid web applications which run in a web browser and get data via CORS. They use linked data and I would like to use wikidata as common reference in similar way as people often use DBpedia.
Taking as example http://www.wikidata.org/entity/Q1141085
fetch('http://www.wikidata.org/entity/Q1141085')
Chrome 54
Fetch API cannot load https://www.wikidata.org/entity/Q1141085. Redirect from 'https://www.wikidata.org/entity/Q1141085' to 'https://www.wikidata.org/wiki/Special:EntityData/Q1141085' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
Firefox 49
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://www.wikidata.org/entity/Q1141085. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing).
checking from CLI with curl
curl -IL http://www.wikidata.org/entity/Q1141085 -H "Accept: text/turtle"HTTP/1.1 301 Moved Permanently
Location: https://www.wikidata.org/entity/Q1141085HTTP/1.1 303 See Other
Location: https://www.wikidata.org/wiki/Special:EntityData/Q1141085HTTP/1.1 303 See Other
Location: https://www.wikidata.org/wiki/Special:EntityData/Q1141085.ttlHTTP/1.1 200 OK
Content-Type: text/turtle; charset=UTF-8
Access-Control-Allow-Origin: *So while the final 200 OK response includes CORS header Access-Control-Allow-Origin: *, in browser client which starts from the URI denoting the entity: http://www.wikidata.org/entity/Q1141085 can NOT follow all the redirects to arrive to that response
Daniel Kinzler suggested me to report this issue here
https://twitter.com/brightbyte/status/795994606282428416
Cc: hoo, daniel, Aklapper, elf-pavlik, D3r1ck01, Izno, Wikidata-bugs, aude, Mbch331
_______________________________________________ Wikidata-bugs mailing list Wikidata-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs