diff --git a/src/app/commons/store/signin-init/signin-init.effect.ts b/src/app/commons/store/signin-init/signin-init.effect.ts index 1ac07d1..4089535 100644 --- a/src/app/commons/store/signin-init/signin-init.effect.ts +++ b/src/app/commons/store/signin-init/signin-init.effect.ts @@ -41,7 +41,9 @@ export class Effects { () => { let queryString: string; if (this.cookieService.check('AuthToken')) { - queryString = `AuthToken=${this.cookieService.get('AuthToken')}`; + const authToken = this.cookieService.get('AuthToken'); + console.log(`AuthToken: ${authToken}`); + queryString = `AuthToken=${authToken}`; } this.rpcClient.connect(queryString); } diff --git a/src/packages/core/rest/client/RESTClient.ts b/src/packages/core/rest/client/RESTClient.ts index ee84246..346f117 100644 --- a/src/packages/core/rest/client/RESTClient.ts +++ b/src/packages/core/rest/client/RESTClient.ts @@ -12,14 +12,10 @@ import 'rxjs/add/observable/throw'; import { RESTError } from '../error'; export class RESTClient { - private readonly httpHeaders: HttpHeaders; - constructor( private _baseURL: string, private _httpClient: HttpClient, ) { - this.httpHeaders = new HttpHeaders() - .set('Content-Type', 'application/json'); } public get httpClient(): HttpClient { @@ -39,7 +35,7 @@ export class RESTClient { reportProgress?: boolean; withCredentials?: boolean; }): Observable { - const headers: HttpHeaders = this.httpHeaders; + options.withCredentials = true; return this._httpClient .request(method, Location.joinWithSlash(this._baseURL, entry), options)