Retrieve service information during middleware execution

I am developing a middleware plugin that requires me to know the URL that a request will be routed to during the middleware stage. A router will use this middleware to sign requests but part of the signing process involves using the url being routed to, which is defined in the service. When a middleware is executing, how could I retrieve the url or traefik service that will be receiving the request?

I don’t think that is possible. The process is

router -> middleware -> service

So the final target service URL is not known.