Is it a good practice to store the csrf token in meta tag?

拈花ヽ惹草 提交于 2019-12-03 06:25:23

Yes this is good practice. If you are using ajax I think this is the cleanest solution.

You could also put the token inside of the form (which is more convenient if submitting the whole form), but if you are using ajax, it just needs to go somewhere that you can grab it.

in a hidden field, or in a meta tag are both very good options.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!