addPrefix label is ignored

Trying to get addPrefix label to work in docker compose but traefik is completely ignoring the following label:

- "traefik.http.middlewares.add-guacamole.addPrefix.prefix=/guacamole"

Normally the application is accessed by going to http://remote.domain.tld/guacamole

I don't want to have to put the /guacamole at the end of the URL. Right now the http to https works fine but the prefix does not. Here's my label config:

labels:

- "traefik.enable=true"
      - "traefik.http.routers.remote.entrypoints=http"
      - "traefik.http.routers.remote.rule=Host(`remote.domain.tld`)"
      - "traefik.http.middlewares.remote-https-redirect.redirectscheme.scheme=https"
      - "traefik.http.middlewares.add-guacamole.addPrefix.prefix=/guacamole"
      - "traefik.http.routers.remote.middlewares=remote-https-redirect"
      - "traefik.http.routers.remote-secure.entrypoints=https"
      - "traefik.http.routers.remote-secure.rule=Host(`remote.domain.tld`)"
      - "traefik.http.routers.remote-secure.tls=true"
      #- "traefik.http.routers.remote-secure.tls.certresolver=le"
      - "traefik.http.routers.remote-secure.service=remote"
      - "traefik.http.services.remote.loadbalancer.server.port=8080"
      - "traefik.docker.network=proxy"

I would appreciate some help

Hello,

a middleware need to be referenced in a router:

labels:
- "traefik.enable=true"
- "traefik.docker.network=proxy"

# Routers
- "traefik.http.routers.remote.entrypoints=http"
- "traefik.http.routers.remote.rule=Host(`remote.domain.tld`)"
- "traefik.http.routers.remote.middlewares=remote-https-redirect"

- "traefik.http.routers.remote-secure.entrypoints=https"
- "traefik.http.routers.remote-secure.rule=Host(`remote.domain.tld`)"
- "traefik.http.routers.remote-secure.tls=true"
- "traefik.http.routers.remote-secure.tls.certresolver=le"
- "traefik.http.routers.remote-secure.service=remote"
- "traefik.http.routers.remote-secure.middlewares=add-guacamole"

# Service definition
- "traefik.http.services.remote.loadbalancer.server.port=8080"

# Middleware definitions
- "traefik.http.middlewares.remote-https-redirect.redirectscheme.scheme=https"
- "traefik.http.middlewares.add-guacamole.addPrefix.prefix=/guacamole"

Thank you so much. That solved my problem.