This topic is locked.

[SOLVED] API Request - Cross-Origin Resource Sharing Problem
At the moment I am trying to program a tool (and after that a discord bot), which let's you browse pictures via Konachan and will send you back the "file_url" from the JSON file.
Unfortuantely I somehow get an error warning about CORS.
(Warning: "Cross origin requests are only supported for protocol schemes" )

Now my problem is, that my browser (currently Chorme) won't let me get that JSON file.
I cannot belive that the Admins of Konachan haven't added "Access-Control-Allow-Origin: * " to their server response, since I've read about other Users who like me, extracted the "file_url" from the JSON response file.

I really appreciate any tipps/advice and things I may could have forgotten to do in order to receive the JSON file.

Best regards and wishes
- Rumblbee

EDIT:
I may know the reason behind all this. As I am testing the looks/functions of my "tool" I do that locally in the browser, which obviously determines my origin as "null" and therefore I cannot retrieve the JSON response.

So my following question would be, does anyone (maybe of the web-developers ) know any good hosting option for a simple html site + javascript?
I've heard of XAMPP, can they provide such service?

EDIT 2 & SOLUTION:
I think I wasn't able to pull the JSON request, because thorugh local testing in my browser its origin undefined. The Server of Konachan could therefore not [aaa] my request because it just wasn't allowed to.
In my last edit I brought up the question whether XAMPP could provide such service (changing the origin of your browser) and the asnwer is no. Since it would only change the origin from "undefined" to "localhost" which is kind of the equivalent to undefined since its blocked, too.

But I found this little Chrome extension called "Allow-Control-Allow-Origin: *" which you can find by the following link.
https://chrome.google.com/webstore/detail/allow-control-allow-origi/nlfbmbojpeacfghkpbjhddihlkkiljbi?utm_source=chrome-app-launcher-info-dialog

I wish you pleasant day and hereby I declare this as SOLVED!
- rumblbee
Cool, glad you got it resolved.