Routes Invert Path against registration

Hello everyone,

I'm having problems using the invertion symbol '!' as described in the router docs:
https://doc.traefik.io/traefik/routing/routers/

I using cvat with treafik and trying do disable access to CVAT_HOST/auth/register/
page because the default setting is, that everyone can register.

Following label for the routes I added to the default docker-compose from cvat.

      - traefik.http.routers.cvat-ui.rule=Host(`${example.com:-localhost}`) && ! PathPrefix(`/auth/register/`)

I get the following traefik error:


time="2021-11-03T14:04:56Z" level=error msg="error while parsing rule Host(`example.com`) && ! PathPrefix(`/auth/register/`): ! is not supported" routerName=cvat-ui@docker entryPointName=websecure
time="2021-11-03T14:04:56Z" level=debug msg="invalid rule Host(`example.com`) && ! PathPrefix(`/auth/register/`), error: ! is not supported" entryPointName=websecure routerName=cvat-ui@docker
time="2021-11-03T14:04:56Z" level=error msg="Error parsing domains in provider ACME: ! is not supported" providerName=lets-encrypt.acme routerName=cvat-ui@docker rule="Host(`example.com`) && ! PathPrefix(`/auth/register/`)"

Maybe someone can point me in the right direction?
Is there any other way to limit access to this specific uri?

Thanks in advance.
Leander

Hello @legeiger and thanks for your interest in Traefik,

The ! support has been introduced in Traefik v2.5 (see Support not in rules definition by juliens · Pull Request #8164 · traefik/traefik · GitHub) and if I'm not wrong you are using the v2.4 (cvat/docker-compose.yml at develop · openvinotoolkit/cvat · GitHub).

Hope this helps!

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.