CSRF_EXEMPT无法在我的Django项目中使用
我正在使用django 3.2我试图在我的网站上使用twilio webhook,但仍然遇到错误
403 forbidden
<p>CSRF verification failed. Request aborted.</p>
<p>You are seeing this message because this site requires a CSRF cookie
when submitting forms. This cookie is required for security reasons, to
ensure that your browser is not being hijacked by third parties.</p>
<p>If you have configured your browser to disable cookies, please
re-enable them, at least for this site, or for “same-origin” requests.</p>
我的视图
@csrf_exempt
@validate_twilio_request
def webhook(request):
return HttpResponse("something")
我在做什么错?
I am using django 3.2 I am trying to use a twilio webhook on my site but still getting the error
403 forbidden
<p>CSRF verification failed. Request aborted.</p>
<p>You are seeing this message because this site requires a CSRF cookie
when submitting forms. This cookie is required for security reasons, to
ensure that your browser is not being hijacked by third parties.</p>
<p>If you have configured your browser to disable cookies, please
re-enable them, at least for this site, or for “same-origin” requests.</p>
my view
@csrf_exempt
@validate_twilio_request
def webhook(request):
return HttpResponse("something")
what are my doing wrong?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论