JWT token validator and redirect based on field

I am trying to understand whats possible with using a combination of Routing rules and Middleware. I am trying to route a request based on a dynamic header field, ie. customer in a JWT token. The issue is that the routing rule is executed before the middleware. So, I have tried to use a landing page with the jwt middlewrae to unpack the request, fetch the key from the JWT token, and inject into headers which would forward the request to the proper route URL/path in a namespace. We are using the Kubernetes IngressRoute and have tried a few different ways to accomplish this, without any success.

Request 
\--> some.place.io/api/serviceA-router, namespace: main 
         \--> JWT unpacks token and fetches field: customer-name 
                      \-->  forward request/redirect to some.place.io/api/serviceA, namespace: customer-name

I have seen some plugins that make use of variables in the configuration like {ip}, and not sure how this could be customized of used. I have gone through quite a bit of documentation in Yaegi, creating plugins, providers, and still not sure how it's possible to accomplish something like this.

I have tried with injecting headers from the unpacked JWT token, but the header field is lost during a redirect.

apiVersion: traefik.containo.us/v1alpha1
kind: IngressRoute
metadata:
  name: svcA
  namespace: main
spec:
  entryPoints:
  - websecure
  routes:
  - kind: Rule
    match: Host(`api.company.io`) && Path(`/service`)
    middlewares:
    - name: token # token is unpacked and finds "customer: A"
    priority: 1
    services:
    - name: echo
      port: 80
  - kind: Rule
    match: Host(`api.company.io`) && Path(`/service`) && Headers(`customer`, `A`)
    priority: 2
    services:
    - name: svc-a-customer-A
      port: 80

I have looked through lots of topics in the community and haven't found something specifically that is similar to this, but it seems like this should be a simple thing out of the box with Traefik.

Any one can help point the way?

Thanks.