csrf - 如何关闭 tastypie 帖子中的 csrf?

标签 csrf tastypie

当我打开 session 身份验证时,根据: https://django-tastypie.readthedocs.org/en/latest/authentication_authorization.html 我需要csrf。 我怎样才能暂时关闭它? 我看到类似https://django-tastypie.readthedocs.org/en/latest/cookbook.html?highlight=csrf#determining-format-via-url的东西 我想我需要重写除wrap_view之外的另一种方法,并且除了@csrf_exempt之外什么都不做。 Google 确实没有向我返回任何内容。

最佳答案

我遇到了同样的问题,我通过重写 SessionAutentication 方法解决了它。

关于csrf - 如何关闭 tastypie 帖子中的 csrf?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14667951/

相关文章:

django-tastypie - 如何通过关系使许多人

django - 为多表继承Django模型填充好吃的资源

authorization - Tastypie 后认证问题

node.js - 重定向时 Express 上未设置 Csrf token

ios - IOS原生应用注册表单的CSRF保护?

python - Django csrf_token 未实现隐藏字段

csrf - Elm:http.post csrf

security - 为什么随机 CSRF key 可以防止 CSRF 攻击?

python - 在 Python 中生成 API KEY 和 SECRET 的最简单和最安全的方法是什么

django - 薄饼否定过滤器