I want to use my django app to provide REST APIs to my web app hosted on another site. So that web app can send ajax request to my Django app to get data. However the issue of CORS comes. The ajax request is always blocked by browser, because pythonanywhere donnot have CORS enabled with Django by default.. I found that you donnot have django-cors-headers installed by default and I cannot install it on console with 'pip install django-cors-headers' either. Because it says I donnot have permission.
Is there a way to enable CORS header in Django HttpResponse/JsonResponse?