Skip to content

chore: touch ups to wsproxy UX #8350

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

Merged
merged 15 commits into from
Jul 7, 2023
Merged
Prev Previous commit
Next Next commit
chore: remove localhost warning
  • Loading branch information
Emyrk committed Jul 6, 2023
commit 5ce6a6fc19b4e4069a704ab10d1cc6c3a4118b98
16 changes: 1 addition & 15 deletions enterprise/cli/proxyserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ func (*RootCmd) proxyServer() *clibase.Cmd {
),
Handler: func(inv *clibase.Invocation) error {
if !(primaryAccessURL.Scheme == "http" || primaryAccessURL.Scheme == "https") {
return xerrors.Errorf("primary access URL must be http or https: url=%s", primaryAccessURL.String())
return xerrors.Errorf("'--primary-access-url' value must be http or https: url=%s", primaryAccessURL.String())
}

var closers closers
Expand Down Expand Up @@ -175,20 +175,6 @@ func (*RootCmd) proxyServer() *clibase.Cmd {
defer httpClient.CloseIdleConnections()
closers.Add(httpClient.CloseIdleConnections)

// Warn the user if the access URL appears to be a loopback address.
isLocal, err := cli.IsLocalURL(ctx, cfg.AccessURL.Value())
if isLocal || err != nil {
reason := "could not be resolved"
if isLocal {
reason = "isn't externally reachable"
}
cliui.Warnf(
inv.Stderr,
"The access URL %s %s, this may cause unexpected problems when creating workspaces. Generate a unique *.try.coder.app URL by not specifying an access URL.\n",
cliui.DefaultStyles.Field.Render(cfg.AccessURL.String()), reason,
)
}

// A newline is added before for visibility in terminal output.
cliui.Infof(inv.Stdout, "\nView the Web UI: %s", cfg.AccessURL.String())

Expand Down