Feature - Path Based Routing #362

Closed
opened 2025-11-13 11:58:05 -06:00 by GiteaMirror · 1 comment
Owner

Originally created by @TheRealTrip on GitHub (May 22, 2025).

Feature Request: Support for Path-Based Routing

Summary

I'd like to request support for path-based routing, similar to NGINX's location blocks, in Pangolin.

This feature would allow Pangolin to route traffic based on the request path, not just the domain or port — enabling more advanced reverse proxy behavior that's often required in modern self-hosted setups.


Use Case: Matrix Homeservers (/.well-known Routing)

Matrix homeservers (e.g., Synapse, Dendrite, Conduit) require specific endpoints to be available at the root of a domain to support federation and client discovery:

  • https://example.com/.well-known/matrix/server
  • https://example.com/.well-known/matrix/client

These endpoints are not served by the Matrix backend itself. Instead, they usually come from a separate static site or another service, sometimes even hosted on a different IP or port.

In NGINX, this would look like:

location /.well-known/matrix/ {
    proxy_pass http://127.0.0.1:3000; # separate service
}

location / {
    proxy_pass http://127.0.0.1:8008; # synapse
}
Originally created by @TheRealTrip on GitHub (May 22, 2025). ## Feature Request: Support for Path-Based Routing ### Summary I'd like to request support for path-based routing, similar to [NGINX's `location` blocks](https://nginx.org/en/docs/http/ngx_http_core_module.html#location), in Pangolin. This feature would allow Pangolin to route traffic based on the request path, not just the domain or port — enabling more advanced reverse proxy behavior that's often required in modern self-hosted setups. --- ### Use Case: Matrix Homeservers (`/.well-known` Routing) Matrix homeservers (e.g., Synapse, Dendrite, Conduit) require specific endpoints to be available at the **root of a domain** to support federation and client discovery: - `https://example.com/.well-known/matrix/server` - `https://example.com/.well-known/matrix/client` These endpoints are not served by the Matrix backend itself. Instead, they usually come from a **separate static site or another service**, sometimes even hosted on a different **IP or port**. In NGINX, this would look like: ```nginx location /.well-known/matrix/ { proxy_pass http://127.0.0.1:3000; # separate service } location / { proxy_pass http://127.0.0.1:8008; # synapse } ```
Author
Owner

@oschwartz10612 commented on GitHub (May 22, 2025):

Hello!

Thank you for the request! I think this is a duplicate of https://github.com/orgs/fosrl/discussions/393 and https://github.com/orgs/fosrl/discussions/355 so I am going to close it but feel free to reopen and clarify if it is different.

@oschwartz10612 commented on GitHub (May 22, 2025): Hello! Thank you for the request! I think this is a duplicate of https://github.com/orgs/fosrl/discussions/393 and https://github.com/orgs/fosrl/discussions/355 so I am going to close it but feel free to reopen and clarify if it is different.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/pangolin#362