I'm using Traefik to load balance across different services registered in Consul.
I'm using the consul-catalog configuration and overriding a front end routing rule for one of the services by adding a tag when defining the service in consul:
tags=[“traefik.frontend.rule=PathPrefixStrip:/api,Host:api.service.consul”]
I'm expecting both /api
and api.service.consul
to resolve to my service, however only /api
is successful, however api.service.consul
returns a 404 error.
In other words, only the first rule is being considered. If I switch the tag around:
tags=[“traefik.frontend.rule=Host:api.service.consul,PathPrefixStrip:/api”]
Then api.servie.consul
resolves and /api
returns a 404 error.
I believe the docs suggest this configuration is supported. Has anyone else had success with defining multiple rules via consul tags?