Angular against Asp.Net WebApi, implement CSRF on the server

后端 未结 4 543
别那么骄傲
别那么骄傲 2020-12-04 05:53

I\'m implementing a website in Angular.js, which is hitting an ASP.NET WebAPI backend.

Angular.js has some in-built features to help with anti-csrf protection. On ea

4条回答
  •  一整个雨季
    2020-12-04 06:05

    I think your code is flawed. The whole idea around prevent CSRF is to prevent a unique token on each REQUEST, not each session. If the anti-forgery token is a session persisted value, the ability to perform CSRF still remains. You need to provide a unique token on each request...

提交回复
热议问题