I have this code in axios.ts, i call the function aciosInstance everytime i'm doing a request
baseURL: "http://localhost:8080/",
headers: {
Accept: "application/json",
"Content-Type": "application/json",
},
timeout: 60000,
withCredentials: true,
});```
I have a cookie called region that is manually set on my FE when the page loads and if i go to the application tab i can see my cookie set correctly but looking at the network request i don't see my cookie being send.
I have this piece of code before to set the cookie if it's not already for some reason
```if (!Cookies.get("region")) {
Cookies.set("region", "en-au", { path: "/", domain: "localhost" });
}```
I'm using js-cookie library fo ts files to manage cookies, but doing a console.log i'm getting undefined for Cookies.get("region")
So apparently my cookie is not been set correctly, even though i can see it in my application tab.
If i change my code like this the cookie is send and everything works as expected.
```const axiosInstance = axios.create({
baseURL: "http://localhost:8080/",
headers: {
Accept: "application/json",
"Content-Type": "application/json",
Cookie: `region=en-au}`
},
timeout: 60000,
withCredentials: true,
});```
I'm using SSR, so why i can't access to my region cookie in the .ts file?