0
votes

hi how can i remove cookies from request header set by

$http.defaults.headers.post['X-CSRFToken'] = $cookies.csrftoken;

In header it show as

Accept application/json Accept-Encoding gzip, deflate Accept-Language en-US,en;q=0.5 Connection keep-alive

Cookie JSESSIONID=F215EF9C41E8D897F103751DE8EC833C; AWSELB=8BE3A51B068B8505EFF78592B3B122EBDC441C205CA70B58 4B154F43BD43ED2709E4137E8584EF75C8333E4C3088A0DCFCDEE1397E017F44B3036ABCFD1C213CB95EBEAF1D

1

1 Answers

0
votes

the cookie header is not the X-CSRFToken header.

these are two diffrent headers. you could use withCredentials:

$httpProvider.defaults.withCredentials = false;

but as described in MDN, it will only take effect on cross-origin requests:

setting withCredentials has no effect on same-site requests