How to prevent conflicts in middlewares declaration?

Hi there,

is there a way to prevent conflicts in declaration (accidentally or with intent) when using traefik in junction with Docker (compose) #labels? Especially with middlewares you want share between stacks and have to be known.

The documentation for this is https://docs.traefik.io/master/routing/providers/consul-catalog/#middleware:

If you declare multiple middleware with the same name but with different parameters, the middleware fails to be declared.

traefik_1  | time="2020-01-14T13:15:05+01:00" level=error msg="Middleware defined multiple times with different configurations in [app-app-843673d3296d4d76d78ab8450ed4bc64e41a0d0dd83f08b6be2a7f4676ea63fe whoami-whoami-3f79ff5813eb4c3aa8522f789f35cdf33253a466a7b1e214f71b86e314df015c]" providerName=docker middlewareName=redirect-to-https

Thanks, Jan.