Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: erroneous error message for host validation #1006

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

andrewmd5
Copy link

when crafting an ingress YAML file by hand its easy to write the following by mistake:

ingress:
  - hostname: https://example.com
    service: http://localhost:50100
  - service: http_status:404

cloudflared would report the error: Hostname cannot contain a port

this confused me for a few minutes before i compared two configs and saw my mistake. this change introduces a check prior to port splitting to see if the hostname contains a protocol and reports a relevant error

ingress/ingress.go Outdated Show resolved Hide resolved
when crafting an ingress YAML file by hand its easy to write the following by mistake:
```yaml
ingress:
  - hostname: https://example.com
    service: http://localhost:50100
  - service: http_status:404
```

`cloudflared` would report the error: `Hostname cannot contain a port`

this confused me for a few minutes before i compared two configs and saw my mistake. this change introduces a check prior to port splitting to see if the hostname contains a protocol and reports a relevant error
@chungthuang
Copy link
Contributor

Hi @andrewmd5, we are happy to accept the change if you can rebase and add a unit test to it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants