How to protect against CSRF when using Backbone.js to post data?

前端 未结 4 1124
情话喂你
情话喂你 2021-02-04 14:43

Backbone.js handles posting data to server under the hood, so there is no easy way to insert a CSRF token in the payload. How can I protect my site against CSRF in this situatio

4条回答
  •  心在旅途
    2021-02-04 14:55

    I know it's a bit old question, but I'll leave a link to the github repo of AMD module just for this:

    https://github.com/kuc2477/backbone.csrf.git (disclaimer: I'm the author of the module)

提交回复
热议问题