[GH-ISSUE #1528] Path-based routing not working as expected. #1942

Closed
opened 2026-04-16 08:49:23 -05:00 by GiteaMirror · 7 comments
Owner

Originally created by @maLi9n on GitHub (Sep 23, 2025).
Original GitHub issue: https://github.com/fosrl/pangolin/issues/1528

Originally assigned to: @oschwartz10612 on GitHub.

Path-based routing is not working for me. As an example, I set prefix to /jellyfin, website is reachable at https://jellyfin.homelab.com/ pointing to resource 192.168.0.5:8096 but when I visit https://jellyfin.homelab.com/jellyfin nothing comes up.

Originally created by @maLi9n on GitHub (Sep 23, 2025). Original GitHub issue: https://github.com/fosrl/pangolin/issues/1528 Originally assigned to: @oschwartz10612 on GitHub. Path-based routing is not working for me. As an example, I set prefix to `/jellyfin`, website is reachable at `https://jellyfin.homelab.com/` pointing to resource `192.168.0.5:8096` but when I visit `https://jellyfin.homelab.com/jellyfin` nothing comes up.
GiteaMirror added the enhancement label 2026-04-16 08:49:24 -05:00
Author
Owner

@sippeangelo commented on GitHub (Sep 23, 2025):

It looks like Pangolin's Blueprints feature is missing the "stripprefix" feature that Traefik has. I often want to route a subpath (path prefix) without the underlying service being aware of it. E.g:

labels:
  - traefik.enable=true
  - traefik.docker.network=traefik
  - traefik.http.routers.example-api.rule=(Host(`example.com`) && PathPrefix(`/api`))
  - traefik.http.middlewares.stripprefix-api.stripprefix.prefixes=/api
  - traefik.http.routers.example-api.middlewares=stripprefix-api

Without Pangolin actually stripping the prefix, this feature is a bit neutered. Was this an oversight? Since Pangolin is all Traefik in the background it shouldn't be too hard to implement, hopefully?

<!-- gh-comment-id:3324890287 --> @sippeangelo commented on GitHub (Sep 23, 2025): It looks like Pangolin's Blueprints feature is missing the "stripprefix" feature that Traefik has. I often want to route a subpath (path prefix) without the underlying service being aware of it. E.g: ``` labels: - traefik.enable=true - traefik.docker.network=traefik - traefik.http.routers.example-api.rule=(Host(`example.com`) && PathPrefix(`/api`)) - traefik.http.middlewares.stripprefix-api.stripprefix.prefixes=/api - traefik.http.routers.example-api.middlewares=stripprefix-api ``` Without Pangolin actually stripping the prefix, this feature is a bit neutered. Was this an oversight? Since Pangolin is all Traefik in the background it shouldn't be too hard to implement, hopefully?
Author
Owner

@oschwartz10612 commented on GitHub (Sep 23, 2025):

Yeah we should add this. Pretty trivial. Will look into soon.

<!-- gh-comment-id:3325004784 --> @oschwartz10612 commented on GitHub (Sep 23, 2025): Yeah we should add this. Pretty trivial. Will look into soon.
Author
Owner

@sippeangelo commented on GitHub (Oct 31, 2025):

Yeah we should add this. Pretty trivial. Will look into soon.

Thanks for implementing this in v1.11.0! It works great!

<!-- gh-comment-id:3472026560 --> @sippeangelo commented on GitHub (Oct 31, 2025): > Yeah we should add this. Pretty trivial. Will look into soon. Thanks for implementing this in v1.11.0! It works great!
Author
Owner

@maLi9n commented on GitHub (Oct 31, 2025):

Still not working for me.

<!-- gh-comment-id:3472982659 --> @maLi9n commented on GitHub (Oct 31, 2025): Still not working for me.
Author
Owner

@sippeangelo commented on GitHub (Nov 2, 2025):

The strip prefix option works great when configured through the UI for me, but when configuring it through Docker labels it seems that you MUST set a rewritePath for it to work. The UI sets the value to an empty string, but that doesn't seem possible when using the labels, so therefore it breaks. Thankfully, setting rewritePath=/ seems to be equivalent.

Also these labels don't seem documented yet: https://docs.pangolin.net/manage/blueprints#target-configuration

This is how I configure my target in Docker labels:

- pangolin.proxy-resources.paperless.targets[0].method=http
- pangolin.proxy-resources.paperless.targets[0].path=/paperless
- pangolin.proxy-resources.paperless.targets[0].path-match=prefix
- pangolin.proxy-resources.paperless.targets[0].rewrite-match=stripPrefix
- pangolin.proxy-resources.paperless.targets[0].rewritePath=/ # <-- If this is left out, it breaks!
<!-- gh-comment-id:3478037971 --> @sippeangelo commented on GitHub (Nov 2, 2025): The strip prefix option works great when configured through the UI for me, but when configuring it through Docker labels it seems that you MUST set a `rewritePath` for it to work. The UI sets the value to an empty string, but that doesn't seem possible when using the labels, so therefore it breaks. Thankfully, setting `rewritePath=/` seems to be equivalent. Also these labels don't seem documented yet: https://docs.pangolin.net/manage/blueprints#target-configuration This is how I configure my target in Docker labels: ```yaml - pangolin.proxy-resources.paperless.targets[0].method=http - pangolin.proxy-resources.paperless.targets[0].path=/paperless - pangolin.proxy-resources.paperless.targets[0].path-match=prefix - pangolin.proxy-resources.paperless.targets[0].rewrite-match=stripPrefix - pangolin.proxy-resources.paperless.targets[0].rewritePath=/ # <-- If this is left out, it breaks! ```
Author
Owner

@oschwartz10612 commented on GitHub (Nov 2, 2025):

@sippeangelo thanks for pointing this out! I have updated the docs and in c16e762fa4 I have made it so that the rewritePath is now rewrite-path and is backwards compatible with this old version. I have also made it so that the / is included by default.

<!-- gh-comment-id:3478408796 --> @oschwartz10612 commented on GitHub (Nov 2, 2025): @sippeangelo thanks for pointing this out! I have updated the docs and in c16e762fa43d4c87e12095f7482f75a4b9a1e5e9 I have made it so that the `rewritePath` is now `rewrite-path` and is backwards compatible with this old version. I have also made it so that the `/` is included by default.
Author
Owner

@legionGer commented on GitHub (Dec 9, 2025):

Is this issue fixed for sure? Because I am running in a very similar issue ... /jellyfin/ works fine, /jellyfin goes nowhere.

<!-- gh-comment-id:3632846972 --> @legionGer commented on GitHub (Dec 9, 2025): Is this issue fixed for sure? Because I am running in a very similar issue ... /jellyfin/ works fine, /jellyfin goes nowhere.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/pangolin#1942