docs(http): fixed syntax error in AuthInterceptor example
This commit is contained in:
parent
0bb8423df9
commit
7e72317059
|
@ -357,7 +357,7 @@ export class AuthInterceptor implements HttpInterceptor {
|
||||||
|
|
||||||
intercept(req: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> {
|
intercept(req: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> {
|
||||||
// Get the auth header from the service.
|
// Get the auth header from the service.
|
||||||
const authHeader: this.auth.getAuthorizationHeader();
|
const authHeader = this.auth.getAuthorizationHeader();
|
||||||
// Clone the request to add the new header.
|
// Clone the request to add the new header.
|
||||||
const authReq = req.clone({headers: req.headers.set('Authorization', authHeader)});
|
const authReq = req.clone({headers: req.headers.set('Authorization', authHeader)});
|
||||||
// Pass on the cloned request instead of the original request.
|
// Pass on the cloned request instead of the original request.
|
||||||
|
|
Loading…
Reference in New Issue