Middleware to add the "/" if needed

Here's the solution

    - traefik.http.middlewares.strip-prefix.chain.middlewares=strip-prefix-1,strip-prefix-2
    - traefik.http.middlewares.strip-prefix-1.redirectregex.regex=^(https?://[^/]+/[a-z0-9_]+)$$
    - traefik.http.middlewares.strip-prefix-1.redirectregex.replacement=$${1}/
    - traefik.http.middlewares.strip-prefix-1.redirectregex.permanent=true
    - traefik.http.middlewares.strip-prefix-2.stripprefixregex.regex=/[a-z0-9_]+
6 Likes