On Fri, Mar 2, 2018 at 10:42 PM, Ahmed Fasih <[email protected]> wrote:
> Hello, and a thousand apologies if I'm in the wrong place to ask about this.
>
> I'm making a web-based tool that makes a web request to a CSV file at
> https://wikistats.wmflabs.org — however, because that webserver hasn't
> enabled CORS (cross-origin resource sharing), most browsers can't
> fetch the file.
>
> To see this, open your browser to any non-WMFlabs.org URL (like
> github.com), then open the JavaScript Console, and type in the
> following:
>
> fetch('https://wikistats.wmflabs.org/api.php?action=dump&table=wikipedias&format=csv').then(res
> => res.json()).then(x=>console.log(x))
>
> Firefox for example will tell you, "Cross-Origin Request Blocked: The
> Same Origin Policy disallows reading the remote resource at
> https://wikistats.wmflabs.org/api.php?action=dump&table=wikipedias&format=csv.
> (Reason: CORS header ‘Access-Control-Allow-Origin’ missing).
> TypeError: NetworkError when attempting to fetch resource."
>
> Assuming Wikistats, the Cloud team, and the Wikimedia Foundation *do*
> indeed want this data to be loadable by JavaScript running on any
> domain, the standard way to fix this is to add the
> "Access-Control-Allow-Origin: *" header to all responses sent by the
> webserver. More detail is available at https://enable-cors.org/
>
> I dug around for a while looking for a way to reach someone who might
> be in charge of the https://wikistats.wmflabs.org webserver, and if
> I'm in the wrong place, please accept my apologies.

Information about the actual Cloud VPS project is available at
<https://tools.wmflabs.org/openstack-browser/project/wikistats>.

I think Daniel Zahn is the primary maintainer of this tool. The "bugs"
link in the navigation menu for wikistats.wmflabs.org points to
<https://phabricator.wikimedia.org/tag/vps-project-wikistats/>. That
is probably a good place to file a feature request, but Daniel may see
it here as well.

Bryan
-- 
Bryan Davis              Wikimedia Foundation    <[email protected]>
[[m:User:BDavis_(WMF)]] Manager, Cloud Services          Boise, ID USA
irc: bd808                                        v:415.839.6885 x6855

_______________________________________________
Wikimedia Cloud Services mailing list
[email protected] (formerly [email protected])
https://lists.wikimedia.org/mailman/listinfo/cloud

Reply via email to