django 项目部署后登录admin管理页面报403
解决方案:
在settings页面中添加下列内容:
CORS_ALLOWED_ORIGINS = [
"http://read.only.com",
"http://change.allowed.com",
]
# 添加下列内容
CSRF_TRUSTED_ORIGINS = [
"http://change.allowed.com",
]
CORS_ALLOWED_ORIGINS = [
"http://read.only.com",
"http://change.allowed.com",
]
# 添加下列内容
CSRF_TRUSTED_ORIGINS = [
"http://change.allowed.com",
]