django前端访问后端的跨域问题
django的跨域问题
在settinds.py中d的MIDDLEWARE模块加入’corsheaders.middleware.CorsMiddleware’
MIDDLEWARE = [
'django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware'
原创
2020-08-30 17:33:28 ·
168 阅读 ·
0 评论