Hello All,
I'me trying to create an http router that match Host and PathRegexp.
Our goal is to route images requests to a container and all the other traffic to another container using docker swarm an labels.
I tried to add the following label to the "images" container:
- "traefik.http.routers.wwwexamplecom.rule=(Host(
www.example.com
) && PathRegexp(\\.(jpeg|jpg|png)$$
))"
and the following label to the "all the other traffic" container (negating the PathRegexp):
- "traefik.http.routers.wwwexamplecom.rule=(Host(
www.example.com
) && !PathRegexp(\\.(jpeg|jpg|png)$$
))"
I have the error: "error while parsing rule (Host(www.example.com
) && PathRegexp(\.(jpeg|jpg|png)$
)): unsupported function: PathRegexp"
Could you help me to fix the rule or give me other suggestions?
Thank you very much in advance
Francesco