1200字范文,内容丰富有趣,写作的好帮手!
1200字范文 > python django跨域解决csrf_exempt

python django跨域解决csrf_exempt

时间:2020-01-27 02:55:59

相关推荐

python django跨域解决csrf_exempt

先导入包:from django.views.decorators.csrf import csrf_exempt

1.在需要跨域的视图前面加上装饰器@csrf_exempt

2.在url配置中加入(r’xx’,csrf_exempt(xxx.xxx))

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。