django-cors-headers

github : https://github.com/adamchainz/django-cors-headers

Setup

Install from pip:

pip install django-cors-headers

and then add it to your installed apps: settings.py

INSTALLED_APPS = [
    ...
    'corsheaders',
    ...
]


CORS_ORIGIN_ALLOW_ALL = True
CORS_ALLOW_CREDENTIALS = True