Skip to content
Snippets Groups Projects
Commit 1043ca5c authored by OZGCloud's avatar OZGCloud
Browse files

OZG-2574 OZG-3439 Add header for any /api request

parent 349e8b5e
No related branches found
No related tags found
No related merge requests found
......@@ -40,7 +40,8 @@ export class XhrInterceptor implements HttpInterceptor {
}
isApiRequest(url: string): boolean {
return url.startsWith(this.envConfig.remoteHost);
const urlObject: URL = new URL(url);
return urlObject.pathname.startsWith('/api');
}
addHeader(req: HttpRequest<unknown>): HttpRequest<unknown> {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment