I followed the tutorial on SPA app (using Angular 8) and for some reason it is not allways calling properly the interceptor.
There are two endpoints on my API server, in particular, when I make a POST request to /api/door (to create a new door), it doesn’t add the token, but when I make a GET request to /api/door/all to get all the doors, it does.
When looking at the different requests in background, I noticed that for that POST request to /api/door, an OPTIONS one is fired with only “Access-Control-Request-Headers: content-type”, when all the other POST request for which the token is properly added, the OPTIONS one has “Access-Control-Request-Headers: authorization,content-type”.
Any body would have an idea why ? I don’t remember making any configuration on what request should or should not require Authorization Token. I did not implement any filter on the HttpInterceptor also.
Thanks in advance for your help.