Hi,
If you are only fetching data via the API, then you should only be
making GET requests, right? In that case, did you try setting the
"origin=*" GET parameter? That should be enough to set the appropriate
CORS headers on the response.
See:
https://www.mediawiki.org/wiki/API:Cross-site_requests
Cheers,
Antonin
On 31/03/2023 16:28, admin(a)hindibox.co.in wrote:
Dear Wikidata API team,
I am writing to request that you whitelist my domain, hindibox.co.in,
for Cross-Origin Resource Sharing (CORS). I am currently working on a
project that requires fetching data from the Wikidata API, but I am
encountering the "Cross-Origin Request Blocked" error due to the
Same-Origin Policy.
I have tried using the |https://cors-anywhere.herokuapp.com| proxy to
bypass this issue, but I am now getting a 403 error. After researching
this issue, I found that the best solution is to request that my domain
be added to your CORS whitelist.
I would greatly appreciate it if you could add hindibox.co.in to your
CORS whitelist so that I can continue working on my project. Please let
me know if there is any additional information or steps that I need to
take to make this happen.
Thank you for your attention to this matter.
Best regards,
Hindibox Team
_______________________________________________
Wikidata-tech mailing list -- wikidata-tech(a)lists.wikimedia.org
To unsubscribe send an email to wikidata-tech-leave(a)lists.wikimedia.org