Published
- 1 min read
django cors allow all
The solution for this is noted below
django cors allow all
Solution
#pip install django-cors-headers
#'django.middleware.csrf.CsrfViewMiddleware', – comment out this middlewire
MIDDLEWARE = [
'corsheaders.middleware.CorsMiddleware',
……
]
CORS_ORIGIN_ALLOW_ALL = True
CORS_ORIGIN_ALLOW_ALL = True
Try other methods by searching on the site. That is if this doesn’t work