Understanding the Rails Authenticity Token

前端 未结 10 1034
攒了一身酷
攒了一身酷 2020-11-22 05:55

I am running into some issues regarding the Authenticity Token in Rails, as I have many times now.

But I really don\'t want to just solve this problem and go on. I w

10条回答
  •  渐次进展
    2020-11-22 06:23

    The Authenticity Token is rails' method to prevent 'cross-site request forgery (CSRF or XSRF) attacks'.

    To put it simple, it makes sure that the PUT / POST / DELETE (methods that can modify content) requests to your web app are made from the client's browser and not from a third party (an attacker) that has access to a cookie created on the client side.

提交回复
热议问题