Wednesday 12 May 2021

Access-control-allow-credential and ccess-Control-Allow-Headers x-xsrf-token

 https://stackoverflow.com/questions/38589944/angular2-x-xsrf-token-is-not-allowed-by-access-control-allow-headers



In my case I had to add the 'x-xsrf-token' value to 'Access-Control-Allow-Headers' header:

header('Access-Control-Allow-Headers: Content-Type, x-xsrf-token')


https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Credentials
Access-Control-Allow-Credentials: true


No comments:

Post a Comment