Currently there's no way to define additional custom middleware via exoframe config because Traefik v2.0 requires new middlewares to be explicitly included into the list on router.
There are two possible options:
Automatically parse all given user labels, look for labels that start with traefik.http.middlewares, extract name and auto-add it to middlewares list, e.g. adding redirect would be:
First option is easier for basic stuff, while second is more powerful (allows using middlewares from traefik config, etc). Maybe a combination of two would be best.
Currently there's no way to define additional custom middleware via exoframe config because Traefik v2.0 requires new middlewares to be explicitly included into the list on router. There are two possible options:
traefik.http.middlewares
, extract name and auto-add it to middlewares list, e.g. adding redirect would be:middlewares
property that should list middlewares in traefik format, e.g. adding redirect would be:First option is easier for basic stuff, while second is more powerful (allows using middlewares from traefik config, etc). Maybe a combination of two would be best.