How do I weight two PathPrefixs in traefik 2.x

14 Views Asked by At

Given I have the following PathPrefix configurations, in this order:

  • PathPrefix(/us/booking) -> points to an application called "Bar"
  • PathPrefix(/us/bookingconfirmation) -> points to an application called "Foo"

At present, /us/bookingconfirmation is served by application Bar but should be served by Foo.

Moving the Foo application above Bar isn't feasible, ideally, I'm looking for a weight to be applied.

How do I weight /us/bookingconfirmation so that it's served by Foo.

1

There are 1 best solutions below

0
steadweb On

The answer to this is Priority.

See https://doc.traefik.io/traefik/routing/routers/#priority