cloudflared
cloudflared copied to clipboard
🐛 Public Hostnames "Path" is appended to Service URL
Opening this as a cloudflared issue at the suggestion of @ranbel. See also: https://github.com/cloudflare/cloudflare-docs/issues/7264
Describe the bug
The Public Hostname Page
for a Cloudflare Tunnel has three fields:
(optional) Subdomain | (required) Domain | (optional) Path |
---|
As the documentation clearly states, this can be used to expose http resources like so:
subdomain.domain.com >> http://localhost:1234
However, it seems that the beheviour is currently such that instead of:
subdomain.domain.com/path1 >> http://localhost:1234
subdomain.domain.com/path2 >> http://localhost:5678
we get:
subdomain.domain.com/path1 >> http://localhost:1234/path1
subdomain.domain.com/path1 >> http://localhost:1234/path2
To Reproduce Steps to reproduce the behavior:
- Follow the Cloudflared documentation to expose any HTTP resources to the Internet via a public hostname.
Expected behavior
subdomain.domain.com/path1 >> http://localhost:1234
subdomain.domain.com/path2 >> http://localhost:5678
Environment and versions
- OS: macOS
- Architecture: ARM
- Version: 1429-9b8a53343597
Logs and errors N/A
Additional context N/A
This is very cumbersome - we may put a component rewriting the path in front of service, but it would be ideal if cloudflared can do this. This would be a breaking change so probably needs a config at each public hostname level.