Feature - Path Based Routing #1464

Closed
opened 2026-04-05 19:29:08 +02:00 by MrUnknownDE · 0 comments
Owner

Originally created by @TheRealTrip on 5/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 5/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 } ```
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/pangolin#1464