# Adding a middleware with container label?

**URL:** <https://community.traefik.io/t/adding-a-middleware-with-container-label/15669>\
**Category:** Traefik v2\
**Tags:** docker-swarm, middleware, docker\
**Created:** [September 7, 2022, 9:48am UTC](https://community.traefik.io/t/adding-a-middleware-with-container-label/15669 "2022-09-07T09:48:15Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![rrrbbb](https://avatars.discourse-cdn.com/v4/letter/r/f04885/32.png) [@rrrbbb](https://community.traefik.io/u/rrrbbb)\
**Post date:** [September 7, 2022, 9:48am UTC](https://community.traefik.io/t/adding-a-middleware-with-container-label/15669/1 "2022-09-07T09:48:15Z")

</div>

I'm using traefik with Docker Swarm. I use forwardauth and set the middleware with this label:

```auto
traefik.http.routers.redirs.middlewares=authelia-sendutil@docker

```

It works perfectly.  
Now, in other services, I want to append a middleware to the `redirs` router.  
So when deploying service `A` I want to add `middleware-A`, and equivalently with service `B`.  
I would need to configuration to be equivalent to setting the label

```auto
traefik.http.routers.redirs.middlewares=authelia-sendutil@docker,middleware-A@docker,middleware-B@docker

```

Is there a way to achieve this?  
(I can provide detailed information why I want this, and I also have a workaround if this is not possible 😉 )
