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