8000 chore: server header specifies if wsproxy (#8432) · coder/coder@e9d7a23 · GitHub
[go: up one dir, main page]

Skip to content

Commit e9d7a23

Browse files
authored
chore: server header specifies if wsproxy (#8432)
1 parent 928091a commit e9d7a23

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

cli/server.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ func (r *RootCmd) Server(newAPI func(context.Context, *coderd.Options) (*coderd.
234234
filesRateLimit = -1
235235
}
236236

237-
PrintLogo(inv)
237+
PrintLogo(inv, "Coder")
238238
logger, logCloser, err := BuildLogger(inv, cfg)
239239
if err != nil {
240240
return xerrors.Errorf("make logger: %w", err)
@@ -1333,13 +1333,15 @@ func newProvisionerDaemon(
13331333
}
13341334

13351335
// nolint: revive
1336-
func PrintLogo(inv *clibase.Invocation) {
1336+
func PrintLogo(inv *clibase.Invocation, daemonTitle string) {
13371337
// Only print the logo in TTYs.
13381338
if !isTTYOut(inv) {
13391339
return
13401340
}
13411341

1342-
_, _ = fmt.Fprintf(inv.Stdout, "%s - Your Self-Hosted Remote Development Platform\n", cliui.DefaultStyles.Bold.Render("Coder "+buildinfo.Version()))
1342+
versionString := cliui.DefaultStyles.Bold.Render(daemonTitle + " " + buildinfo.Version())
1343+
1344+
_, _ = fmt.Fprintf(inv.Stdout, "%s - Your Self-Hosted Remote Development Platform\n", versionString)
13431345
}
13441346

13451347
func loadCertificates(tlsCertFiles, tlsKeyFiles []string) ([]tls.Certificate, error) {

enterprise/cli/proxyserver.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ func (*RootCmd) proxyServer() *clibase.Cmd {
108108

109109
go cli.DumpHandler(ctx)
110110

111-
cli.PrintLogo(inv)
111+
cli.PrintLogo(inv, "Coder Workspace Proxy")
112112
logger, logCloser, err := cli.BuildLogger(inv, cfg)
113113
if err != nil {
114114
return xerrors.Errorf("make logger: %w", err)

0 commit comments

Comments
 (0)
0