-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
进入后台后提示禁止访问? #16
Comments
检查浏览器是否开启cookie功能,可以尝试切换浏览器,更改启动端口。 关于CSRF的详情可以参考官方文档:https://docs.djangoproject.com/zh-hans/5.0/ref/csrf/ |
您本地不能复现吗?我试过你说的放大,都不能解决。我是个老Django了,但是这种问题还是比较头痛 |
我在本地运行没有遇到这个问题。 倒是在部署时有遇到过:以debug模式+ |
问题解决了,在 src/config/settings/components/common.py 文件中加入 |
感谢提供这个方案,响应的django文档: https://docs.djangoproject.com/zh-hans/5.1/ref/settings/#csrf-trusted-origins 我暂时还没有研究更好的解决方案,如果您有好的方案,可以发起Pull Request |
The text was updated successfully, but these errors were encountered: