Traefik / ProxyPass like: using stripprefix, I get a 404 for sub queries

Hello every one,

I'm trying to configure my registry service with traefik.
The idea is to intercep host+path https://my-dns.org/registry and redirect to the service http://registry-ui

here is the configuration of my compose :

...

  registry-ui:
    image: joxit/docker-registry-ui:latest
    container_name: registry-ui
    restart: unless-stopped
    environment:
      - REGISTRY_TITLE=My registry
      - NGINX_PROXY_PASS_URL=http://registry:5000
      - SINGLE_REGISTRY=true
      - DELETE_IMAGES=true
    depends_on:
      - registry
    labels:
      - "traefik.enable=true"
      - "traefik.http.routers.registry-ui.entrypoints=https"
      - "traefik.http.routers.registry-ui.rule=Host(`my-dns.org`) && PathPrefix(`/registry`)"
      - "traefik.http.routers.registry-ui.middlewares=test-stripprefix"
      - "traefik.http.routers.registry-ui.tls.certresolver=myresolver"
      - "traefik.http.middlewares.test-stripprefix.stripprefix.prefixes=/registry"
      - "traefik.http.middlewares.test-stripprefix.stripprefix.forceSlash=false"
      - "traefik.http.services.registry-ui.loadbalancer.server.port=80"
...

I also tried with this with the same result :

- "traefik.http.middlewares.test-replacepath.replacepath.path=/"

As a result, the index page works fine, but css, js and favicon are lost because the requests look like :

  • https://my-dns.org/docker-registry-ui.css
    instead of
  • https://my-dns.org/registry/docker-registry-ui.css

however, the index writes a relative path... <script src="docker-registry-ui.js">

Any idea on how to fix my configuration ?
Thanks in advance