I have app on domain.com
and sub.domain.com
. Both apps set cookie with name X-XSRF-TOKEN
but with different domain value.
I use this settings for Axios, so Axios take token from cookies and set it to headers:
axios.defaults.xsrfCookieName = "XSRF-TOKEN"
axios.defaults.xsrfHeaderName = "X-XSRF-TOKEN"
My app on subdomain send X-XSRF-TOKEN
header from cookie taken from main domain (because it returned first when axios looking for XSRF-TOKEN
cookie). How to deal with this ?
How to tell Axios take cookie from current domain ?