Hi,
I'm trying to render a shiny app (in docker swarm mode) using traefik, but the app does not render fully without the trailing slash.
I've tried modifying the docker compose yml file to add a trailing slash but still the app does not render - it only renders fully when a slash (/) is manually added to the URL in the browser.
I've been trying to resolve this for ages without any success.
Any feedback would be appreciated.
Here are the labels in my current yml file:
- "traefik.enable=true"
- "traefik.docker.network=test_net2"
- "traefik.http.routers.app.entrypoints=web"
- "traefik.http.routers.app.rule=Host(`domain.com`, `www.domain.com`) && PathPrefix(`/app`)"
- "traefik.http.middlewares.app.stripprefix.prefixes=/app"
- "traefik.http.routers.app.middlewares=app@docker"
- "traefik.http.services.app.loadbalancer.server.port=3838"
- "traefik.http.services.app.loadbalancer.sticky=true"
- "traefik.http.services.app.loadbalancer.sticky.cookie.name=stickycookie"
- "traefik.http.services.app.loadbalancer.sticky.cookie.secure=true"
- "traefik.http.routers.app.entrypoints=websecure"
- "traefik.http.routers.app.tls=true"
- "traefik.http.routers.app.tls.certresolver=le"
I'm using traefik:2.5.3
The above code enables the app to be fully rendered at domain.com/app/, but not domain.com/app
I've tried the following and it makes not difference to the above:
- "traefik.frontend.redirect.regex=^(.*)/app$$"
- "traefik.frontend.redirect.replacement=$$1/app"
- "traefik.frontend.rule=PathPrefix:/app;ReplacePathRegex: ^/app(.*) /$$1"
I've visited many web pages and tried various middlewares