Skip to content

Commit

Permalink
feat: romoved query param from x-page-url (#2844)
Browse files Browse the repository at this point in the history
  • Loading branch information
Suraj Kumar authored and howdysuraj committed Mar 27, 2024
1 parent 2a130bb commit 7bc60aa
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/app/core/interceptors/httpInterceptor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,10 @@ export class HttpConfigInterceptor implements HttpInterceptor {
);
}

getUrlwithoutQueryParam(urlString: string): string {
return urlString.split('?')[0];
}

intercept(request: HttpRequest<string>, next: HttpHandler): Observable<HttpEvent<string>> {
return forkJoin({
token: iif(() => this.secureUrl(request.url), this.getAccessToken(), of(null)),
Expand All @@ -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',
},
});
Expand Down

0 comments on commit 7bc60aa

Please sign in to comment.