From 78c51cc8c7ee58691a209e906db0db5271c23cfc Mon Sep 17 00:00:00 2001 From: Suraj Kumar Date: Wed, 27 Mar 2024 16:14:18 +0530 Subject: [PATCH] feat: romoved query param from x-page-url (#2844) --- src/app/core/interceptors/httpInterceptor.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/app/core/interceptors/httpInterceptor.ts b/src/app/core/interceptors/httpInterceptor.ts index 57c3cd49ef..97b0c963c3 100644 --- a/src/app/core/interceptors/httpInterceptor.ts +++ b/src/app/core/interceptors/httpInterceptor.ts @@ -113,6 +113,10 @@ export class HttpConfigInterceptor implements HttpInterceptor { ); } + getUrlwithoutQueryParam(urlString: string): string { + return urlString.split('?')[0]; + } + intercept(request: HttpRequest, next: HttpHandler): Observable> { return forkJoin({ token: iif(() => this.secureUrl(request.url), this.getAccessToken(), of(null)), @@ -131,7 +135,7 @@ export class HttpConfigInterceptor implements HttpInterceptor { request = request.clone({ setHeaders: { 'X-App-Version': mobileModifiedappVersion, - 'X-Page-Url': `${window.location.href}`, + 'X-Page-Url': this.getUrlwithoutQueryParam(window.location.href), 'X-Source-Identifier': 'mobile_app', }, });