im are running two different servers on same instance with different port numbers, one is node(front-end) and another is tomcat(back-end).
Example: http://localhost:4021 is node server (Angular2 web app), http://localhost:8090 is tomcat server (Java)
Im able to get data from 8090 before login no issues with that, but when i login 2 cookies will be set into the browser through backend. Whenever we make any request for any data these 2 cookies has to be sent by the browser every time to the server in request headers but they are not being sent.
I tried by sending "withCredentials: true" in request options which did not worked.
let headersDefult = new Headers({'Content-Type':'application/json;charset=UTF-8'});
let requestOptions = new RequestOptions({ headers: headersDefult, withCredentials: true });
httpPOST(link, payload): Observable<any> {
let url = 'http://localhost:8090/';
let self = this;
return this.http.post(url, payload, requestOptions)
.map(this.extractData)
.catch(this.handleError);
}