I have a valid JWT token stored in local storage and an interceptor that I borrowed from a tutorial. However, the interceptor is not intercepting requests and adding headers as expected.
Here's where I am making a request:
Here is the code for the interceptor:
In addition, I believe my appmodule is correctly imported:
https://github.com/Marred/Informakcja/blob/master/Informakcja-client/src/app/app.module.ts
When I make a request, I expect the interceptor to log specific messages to the console and add the token to the header. However, it is not functioning as intended and I am unsure why. I compared my code to other online tutorials but did not find any differences that could be causing this issue. My experience with Angular is limited, so debugging this has been challenging.
Any assistance or guidance would be greatly appreciated.