Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

cors header django

Install from pip:

python -m pip install django-cors-headers

and then add it to your installed apps:

INSTALLED_APPS = [
    ...,
    "corsheaders",
    ...,
]

You will also need to add a middleware class to listen in on responses:

MIDDLEWARE = [
    ...,
    "corsheaders.middleware.CorsMiddleware",
    "django.middleware.common.CommonMiddleware",
    ...,
]
Source by pypi.org #
 
PREVIOUS NEXT
Tagged: #cors #header #django
ADD COMMENT
Topic
Name
1+5 =