From 029f7e03783c4c556eda3eabaab5e00c306bd636 Mon Sep 17 00:00:00 2001 From: Adam Chalmers Date: Tue, 17 Nov 2020 14:47:40 -0600 Subject: [PATCH] TUN-3555: Single origin service should default to localhost:8080 --- cmd/cloudflared/tunnel/cmd.go | 1 + ingress/ingress.go | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/cmd/cloudflared/tunnel/cmd.go b/cmd/cloudflared/tunnel/cmd.go index ed4cd522..8667146d 100644 --- a/cmd/cloudflared/tunnel/cmd.go +++ b/cmd/cloudflared/tunnel/cmd.go @@ -369,6 +369,7 @@ func StartServer( tunnelConfig, ingressRules, err := prepareTunnelConfig(c, buildInfo, version, generalLogger, transportLogger, namedTunnel, isUIEnabled) if err != nil { + generalLogger.Errorf("Couldn't start tunnel: %v", err) return err } diff --git a/ingress/ingress.go b/ingress/ingress.go index 255f5e05..25db8f42 100644 --- a/ingress/ingress.go +++ b/ingress/ingress.go @@ -103,7 +103,8 @@ func parseSingleOriginService(c *cli.Context, allowURLFromArgs bool) (OriginServ } return &unixSocketPath{path: path}, nil } - return nil, errors.New("You must either set ingress rules in your config file, or use --url, or use --unix-socket") + u, err := url.Parse("http://localhost:8080") + return &localService{URL: u, RootURL: u}, err } // IsEmpty checks if there are any ingress rules.