LaVOZs

The World’s Largest Online Community for Developers

'; c# - My web browser won't store the cookie from the response header - LavOzs.Com

I have an API located at http://localhost:57780. When I attempt to call the login endpoint from my client (http://localhost:4200), I receive my cookie in the response header AND it is successfully stored in the browsers cookies.

Now, here is my issue: Using the same API, I now call the login endpoint from my client at a different DOMAIN (http://127.0.0.1:4200). I still successfully receive my cookie in the response header ALTHOUGH the browser is not storing this cookie.

I am using the HTTP interceptor so that each call has withCredentials set to true. I have also set Access-Control-Allow-Origin to AllowAnyOrigin.

What am I doing wrong? P.S: This is my first stackOverflow post so any tips would be greatly appreciated :)

Related
How do HttpOnly cookies work with AJAX requests?
Cookies on localhost with explicit domain
Set-Cookie in HTTP header is ignored with AngularJS
Why is it common to put CSRF prevention tokens in cookies?
cookies not writtent even when I receive set-cookie response header
Browser won't store cookie
Browser doesn't set cookie even if it is present in response headers