request.META['CROSS_DOMAIN_CSRF_COOKIE_USED'] =True# Decorate the request with Django's# `ensure_csrf_cookie` to ensure that the usual# CSRF cookie gets set.returnensure_csrf_cookie(func)(*args, **kwargs) 开发者ID:edx,项目名称:edx-platform,代码行数:12,代码来源:decorators.py 示例6: to...
组件:CSRF版本:1.4 严重性:Normal关键词:csrf 抄送:Triage Stage:Ready for checkin Has patch:是Needs documentation:否 Needs tests:否Patch needs improvement:否 Easy pickings:否UI/UX:否 Pull Requests:How to create a pull request 描述¶ I'm using ensure_csrf_cookie decorator to set CSRF protectio...