CSRF / XSRF can be prevented using a number of methods.
One way is to use a token that is unique to the client session, with every request sent by the client to the server; which is checked on the server side. If the request token and the server-side token match, the request is allowed to enter the application, and if not, it is not allowed to enter. Thus, a CSRF attack will be detected.
Although the idea of ββthe method is very clear to me, I'm not sure if rewriting URLs can help prevent a CSRF attack? Can a security guru shed light on this?
source share