I have a go web server to which I am sending requests from my application. I have written an HTTP interceptor in order to attach the auth token given by firebase so I can validate it on my go web server. For some reason, the interceptor doesn't appear to be changing the headers of the request to attach the auth token.
intercept(req: HttpRequest<any>, next: HttpHandler){ return from(this.auth.auth.currentUser.getIdToken()).pipe(switchMap(token => { if(token){ const authReq = req.clone({ setHeaders: { 'Content-Type': 'application/json', Authorization: token, 'Access-Control-Allow-Origin': '*' } }); return next.handle(authReq); } return next.handle(req); }) ); return next.handle(req); } This within a service called AuthHandler which implements HTTPInterceptor. Any help would be appreciated! I am on angularfire version 5.4 and angular9