cloudflare / cloudflare/cloudflared

🐛 Public Hostnames "Path" is appended to Service URL

Open
#1,028 5 comments 3 reactions 0 assignees View on GitHub
Priority: Normal Type: Bug
Dominant language
Go
Stars
15.6k
Forks
1.4k
PR merge metrics
No merged PRs in 30d

Description

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:
1. Follow [the Cloudflared documentation](https://developers.cloudflare.com/cloudflare-one/connections/connect-apps/routing-to-tunnel/) 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](https://hub.docker.com/layers/cloudflare/cloudflared/1429-9b8a53343597/images/sha256-df16e9d442fd8ab3f36440ec8f9893b570568329fae026639e2175e99bb25ae4?context=explore)

**Logs and errors**
N/A

**Additional context**
N/A

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.