I am using a delegating handler to handle authentication of my http requests but I would like the handler to apply only on specific routes and not others. I could do a condition if my handler's code but I am looking for a cleaner solution.
The code in my Startup.cs look like that :
I was hoping to find an overload of AddHttpMessageHandler to specify on which routes I want that to apply or something like that.
In my use case, I don't want my httpclient to use the auth handler when the http request is to a route starting by /app and want it on routes starting by /auth.