When performing a GET or POST using Angular's HTTP service against a server with a different hostname than where the Angular application was served from, returned cookies are, by default, not accepted by the browser.
To enable this, when calling your this.http.get()
or this.http.post()
, you need to add the option withCredentials
and set it to true
. This will allow your browser to accept any third-party cookies.