标签:中间 settings com led ott 添加 问题 djang git
https://github.com/ottoyiu/django-cors-headers/
安装django-cors-headers模块
在settings.py中配置
# 注册app
INSTALLED_APPS = [
...
‘corsheaders‘
]
# 添加中间件
MIDDLEWARE = [
...
‘corsheaders.middleware.CorsMiddleware‘
]
# 允许跨域源
CORS_ORIGIN_ALLOW_ALL = Ture
标签:中间 settings com led ott 添加 问题 djang git
原文地址:https://www.cnblogs.com/xiaowangba9494/p/11748283.html