diff --git a/resident-ui/src/app/core/services/httpinterceptor.ts b/resident-ui/src/app/core/services/httpinterceptor.ts index 711cd24d..1dc9d097 100644 --- a/resident-ui/src/app/core/services/httpinterceptor.ts +++ b/resident-ui/src/app/core/services/httpinterceptor.ts @@ -52,10 +52,15 @@ export class AuthInterceptor implements HttpInterceptor { next: HttpHandler ): Observable> { request = request.clone({ withCredentials: true }); - request = request.clone({ - // setHeaders: { 'X-XSRF-TOKEN': this.cookieService.get('XSRF-TOKEN') } + if(localStorage.getItem("langCode")){ + request = request.clone({ setHeaders: { 'time-zone-offset': this.localTimeZoneOffset, 'locale': defaultJson['languages'][localStorage.getItem("langCode")]['locale'] } - }); + }); + }else{ + request = request.clone({ + setHeaders: { 'time-zone-offset': this.localTimeZoneOffset, 'locale': defaultJson['languages']["eng"]['locale']} + }); + } return next.handle(request).pipe( tap( event => {