如何在ExtJs中实现CSRFGuard AjaxRequest? [英] How to implement CSRFGuard in ExtJs AjaxRequest?
本文介绍了如何在ExtJs中实现CSRFGuard AjaxRequest?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有没有什么方法可以将令牌名称和值添加为Ajax的标题,以便不必为每个AjaxRequest写入。
寻求早期回应。谢谢
解决方案
你可以把它放在 http://docs.sencha.com/ext-js/4-1/#!/api/Ext.Ajax- event-beforerequest
,这将适用于每个AJAX请求
I'm using ExtJs for UI and am doubtful of using CSRFGuard in AjaxRequest of extjs. I'm currently appending the CSRFName and value to the URL of ajax and it is working perfectly fine.
Is there any way that the token name and value could be added as header of Ajax so that it need not be written for each and every AjaxRequest.
Seeking early response. Thanks
解决方案
You could put it in http://docs.sencha.com/ext-js/4-1/#!/api/Ext.Ajax-event-beforerequest
and that would apply to every AJAX request
这篇关于如何在ExtJs中实现CSRFGuard AjaxRequest?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文