Answers for "django how to avoid cors issue"

0

django how to avoid cors issue

pip install django-cors-headers
#settings.py
INSTALLED_APPS = [
    ...
    'corsheaders',
    ...
]
MIDDLEWARE = [
    ...
    'corsheaders.middleware.CorsMiddleware',
    ...
]
ALLOWED_HOSTS=['*']
CORS_ORIGIN_ALLOW_ALL = True
Posted by: Guest on October-07-2021

Python Answers by Framework

Browse Popular Code Answers by Language