csrf简单明了( 转发)

https://www.daguanren.cc/post/csrf-introduction.html

 

csrf_token = request.META.get('CSRF_COOKIE')
request_csrf_token = request.POST.get('csrfmiddlewaretoken', '')
对比这两个token,不一样就拒绝
posted @ 2019-07-03 09:08  凯文队长  阅读(183)  评论(0编辑  收藏  举报