Add support for only forwarding specific url paths #103

Closed
opened 2025-11-13 11:50:07 -06:00 by GiteaMirror · 1 comment
Owner

Originally created by @RichyHBM on GitHub (Feb 24, 2025).

As it currently stands, If I add a service to pangolin it will forward any and all requests no matter the url path.

With my previous setup using cloudflare + manual traefik setup, I could setup the traefik host rule to only respond to specific url paths as such:

  routers:    
    umami:
      rule: "Host(`analytics.domain.co.uk`) && (Path(`/script.js`) || Path(`/api/ingress`))"
      entrypoints:
        - http
      service: umami@file

Which would allow me to publicly allow those endpoints, without allowing full access to the web service.

One option could be to allow a 3rd "custom" option for setting the domain of a resource, which could allow raw traefik rule config to be put in?

Originally created by @RichyHBM on GitHub (Feb 24, 2025). As it currently stands, If I add a service to pangolin it will forward any and all requests no matter the url path. With my previous setup using cloudflare + manual traefik setup, I could setup the traefik host rule to only respond to specific url paths as such: ``` routers: umami: rule: "Host(`analytics.domain.co.uk`) && (Path(`/script.js`) || Path(`/api/ingress`))" entrypoints: - http service: umami@file ``` Which would allow me to publicly allow those endpoints, without allowing full access to the web service. One option could be to allow a 3rd "custom" option for setting the domain of a resource, which could allow raw traefik rule config to be put in?
Author
Owner

@oschwartz10612 commented on GitHub (Feb 24, 2025):

HI!

I think you might be able to do this with the rule feature in beta.14. You could create a allow rule for /script.js and /api/ingress` and then a block rule.

Check that out and let me know if that ends up working for you!

@oschwartz10612 commented on GitHub (Feb 24, 2025): HI! I think you might be able to do this with the rule feature in `beta.14`. You could create a allow rule for `/script.js and `/api/ingress` and then a block rule. Check that out and let me know if that ends up working for you!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/pangolin#103