I'd like to add an X-CSRF token to some $resources, but even though I've been looking to other topic and found taht I could add header this way
return $resource(url, {}, {
connect: {
method: 'POST',
headers: {'headerName': value}
}
});
However I don't have the X-CSRFToken added in the request headers when I set headerName to CSRF-TOKEN or crsftoken, (same goes for X-CSRF-TOKEN
)
Do someone has an idea why it's not working ?
Edit1: I've seen that add a cookie named XSRF-TOKEN
added an header X-XSRF-TOKEN
to my requests but CSRF-TOKEN
does not.