Enable a secure dashboard using a PathPrefix

Yes this is cleaner!

traefik.http.routers.traefik.middlewares=mystrip,myauth

entrypoints

As we have a http-catchall router, we actually have two entrypoints ==> web + websecure

On my side, my two webapps and the dashboard works regardless I use the label traefik.http.routers.traefik.entrypoints=websecure or not. So, I feel that the traefik.http.routers.http-catchall.entrypoints=web does it's job in any case.

works good

    labels:
      #### set core configs
      - "traefik.enable=true"
      - "traefik.http.routers.traefik.rule=Host(`mydomain.club`) && (PathPrefix(`/traefik`) || PathPrefix(`/api`))"

      #### set traefik dashboard
      - "traefik.http.routers.traefik.service=api@internal"

      #### set middlewares: stripprefix for dashboard
      - "traefik.http.routers.traefik.middlewares=mystrip"
      - "traefik.http.middlewares.mystrip.stripprefix.prefixes=/traefik"

      #### set TLS
      - "traefik.http.routers.traefik.tls=true"
      - "traefik.http.routers.traefik.entrypoints=websecure"
      - "traefik.http.routers.traefik.tls.certresolver=leresolver"

      #### set a rule to redirect all http requests to https
      - "traefik.http.routers.http-catchall.entrypoints=web"
      - "traefik.http.routers.http-catchall.rule=hostregexp(`{host:.+}`)"
      - "traefik.http.routers.http-catchall.middlewares=redirect-to-https"
      - "traefik.http.middlewares.redirect-to-https.redirectscheme.scheme=https"

no bueno

But my glitch persist, when I use basic auth, the dashboard is not available.

    labels:
      #### set core configs
      - "traefik.enable=true"
      - "traefik.http.routers.traefik.rule=Host(`mydomain.club`) && (PathPrefix(`/traefik`) || PathPrefix(`/api`))"

      #### set traefik dashboard
      - "traefik.http.routers.traefik.service=api@internal"

      #### set middlewares: stripprefix for dashboard + BasicAuth
      - "traefik.http.routers.traefik.middlewares=mystrip,myauth"
      - "traefik.http.middlewares.mystrip.stripprefix.prefixes=/traefik"
      - "traefik.http.middlewares.myauth.basicauth.users=pascalandy:$$2y$$05$$W10189ezy/7skshywvcz9.nc8yR6M8GvFZmnKugkzsoIGQycJS8Y6"

      #### set TLS
      - "traefik.http.routers.traefik.tls=true"
      - "traefik.http.routers.traefik.entrypoints=websecure"
      - "traefik.http.routers.traefik.tls.certresolver=leresolver"

      #### set a rule to redirect all http requests to https
      - "traefik.http.routers.http-catchall.entrypoints=web"
      - "traefik.http.routers.http-catchall.rule=hostregexp(`{host:.+}`)"
      - "traefik.http.routers.http-catchall.middlewares=redirect-to-https"
      - "traefik.http.middlewares.redirect-to-https.redirectscheme.scheme=https"