csrf简单明了( 转发)

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

csrf_token = request.META.get('CSRF_COOKIE')
request_csrf_token = request.POST.get('csrfmiddlewaretoken', '')
对比这两个token,不一样就拒绝

猜你喜欢

转载自www.cnblogs.com/kevincaptain/p/11124376.html