I have set up an API with Flask on my account and I am accessing it from Heroku. Most of the times the website refuses connection, but this never happens from my machine, so I think this is a CORS problem.
I am passing a user agent and a referer in the headers of the request but it's not working sometimes.
What can I do to avoid this?