I\'ve read the docs and all the related questions on SO, but still Angular\'s XSRF mechanism isn\'t working for me: in no way I can make a POST request with the X-XSRF-TOKEN
On my team, the problem was that we were using an absolute path instead of a relative path.
So do not use an absolute path like:
this.http.post("https://example.com/api/endpoint",data)
Use
this.http.post("api/endpoint",data)
Or use
this.http.post("//example.com/api/endpoint",data)
This is because absolute paths are explicitly ignored by Angular code on HttpClientXsrfModule (see)