Skip to content
Advertisement

cors-anywhere.herokuapp.com not working (503). What else can I try?

I am trying to send a get request to the Wikipedia API. I am sending the request form a angular frontend so i’m trying to use the Heroku CORS Anywhere endpoint to avoid CORS issues. For some reason, I’m still getting a 503 response saying no access-control-allow-origin header is present on the requested resource. Any idea why this would happen/what else I can try?

My code:

JavaScript

Advertisement

Answer

You can deploy a CORS Anywhere server to Heroku in just 2-3 minutes, with 5 commands:

JavaScript

After running those commands, you’ll end up with your own CORS Anywhere proxy running at, e.g. https://cryptic-headland-94862.herokuapp.com/. So then instead of prefixing your request URL with https://cors-anywhere.herokuapp.com, prefix it with your proxy’s URL.

User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement