I'm building a simple API which is to be used with a web application. It receives an image, processes it and responds with some JSON data. I'm setting "CORS_ORIGIN_ALLOW_ALL = True" in the Django config to enable access from an external website.
When I reload my web app by clicking on the green reload button it will work for some time (about a week) and then it will start failing, responding with a 502 error, saying: "cannot load [mywebsite].pythonanywhere.com. No 'Access-Control-Allow-Origin' header is present on the requested resource". If I click the green reload button again it will work again for a couple of days.
I'd be thankful for any help!