Why AntiForgeryToken validation keeps failing?

前端 未结 3 1969
日久生厌
日久生厌 2021-01-22 23:34

I am developing a web API app running using asp.net core2 and Angular. The detailed development environment config is here. I am trying to

3条回答
  •  清酒与你
    2021-01-23 00:17

    You need to issue the XHR Request withCredentials=true that will make the browser sets the cookie, other wise you will get the 400 bad request because cookie is absent and the X-XSRF-TOKEN is either not set or set to empty string

提交回复
热议问题