I am trying to access a new header I have added to my API response in TypeScript. In the Network tab of my developer tools, I can see that the new header I added is present, but when I try req.headers.get("x-web-frontend-version") I just get null.
Here is my code and image of my network tab:
intercept(req: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> {
let headers = req.headers;
console.log('HEADERS: ' + headers.get('x-web-frontend-version'));
const authReq = req.clone({
headers: headers
});
return next.handle(authReq);
}
}
Image:
