django corsheaders settings code example
Example 1: django-cors-headers
$ pipenv install django-cors-headers
# or
$ pip install django-cors-headers
Example 2: django-cors-headers
MIDDLEWARE = [
...
'corsheaders.middleware.CorsMiddleware',
'django.middleware.common.CommonMiddleware',
...
]
Example 3: django-cors-headers
INSTALLED_APPS = [
...
'corsheaders',
...
]