The traefik Web UI does not display middleware

In the picture, traefik.yml File about the configuration of Middleware
but,The traefix Web UI does not display middleware

I don't know why this happens. It is also configured according to the official documents

Hello @wiliiwin

Where/what file did you define this in?

How did you include it in your traefik instance?

docker run -d -p 8080:8080 -p 80:80 \
-v $PWD/traefik.yml:/etc/traefik/traefik.yml \
-v /var/run/docker.sock:/var/run/docker.sock \

My traefik instance is started with a container

Hi @wiliiwin

You only define a static config file in your docker run command. Middlewares are defined in dynamic configuration.

If this middleware is defined in traefik.yml it will not work. You would need to create a file provider and put this definition in that file.

hi,I have configured the middleware as you said

But I set the configuration of Middleware in consul

The traefik UI displays the following error

After defining the middleware in advance, I want to dynamically use the defined middleware or cancel the middleware in the consul

As you are defining it in a file provider and using it in another provider set it as latency-check@file.

Thank you very much. I have solved the problem

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