I'm trying to figure out how to pass the end of a path onto the selected services but I can't figure out how to craft the rule. My services are running on ECS but I don't think that matters really.
Let's say I have two services running but each service actually serves two endpoints (e.g. /dashboard and /admin). I want to have traffic routed something like as follows:
So I'd like to capture any request to example.com/app1/{$PATH_SUFFIX} and then point that to service1:8080/{$PATH_SUFFIX}. I've tried using PathPrefix but that just directs everything matching to service1:8080. I can't figure out how to capture and pass on the needed portion of the path to the actual service.
I suspect the solution is either using a redirect somehow or the middleware tools, but I've struggled to find good examples of this particular scenario. Thanks!
Okay great. Honestly, I'm getting stuck with 404s even without trying to get the part with the suffix working. I've got a service I can go to directly (e.g. HTTP://xx.yy.zz.aa:8080) and I've got a service for it in my dashboard with a rule that looks like Path(/service) but I can't seem to access it through the machine running traefik, whether or not I include a Host(``) rule.
I'll keep playing around with it but I think I'm misunderstanding something fundamental about Host and Path rules. Thanks again for your help.