Last active
November 1, 2017 08:42
-
-
Save bbogdanov/aa9f0d5c60893199ed5e60cddeaf22ce to your computer and use it in GitHub Desktop.
Revisions
-
bbogdanov revised this gist
Nov 1, 2017 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -9,7 +9,7 @@ export class ServerLocationInterceptor implements HttpInterceptor { next: HttpHandler): Observable<HttpEvent<any>> { const clonedRequest: HttpRequest<any> = req.clone({ url: 'https://someurl.example/' }); return next.handle(clonedRequest); -
bbogdanov created this gist
Nov 1, 2017 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,18 @@ import { Injectable } from '@angular/core'; import { HttpEvent, HttpHandler, HttpInterceptor, HttpRequest } from '@angular/common/http'; import { Observable } from 'rxjs/Observable'; @Injectable() export class ServerLocationInterceptor implements HttpInterceptor { public intercept(req: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> { const clonedRequest: HttpRequest<any> = req.clone({ url: 'https://someurl.example/' + req.url }); return next.handle(clonedRequest); } }