chore: server header specifies if wsproxy (#8432)

This commit is contained in:
Steven Masley
2023-07-12 12:07:36 +00:00
committed by GitHub
parent 928091aa05
commit e9d7a230fa
2 changed files with 6 additions and 4 deletions
+5 -3
View File
@@ -234,7 +234,7 @@ func (r *RootCmd) Server(newAPI func(context.Context, *coderd.Options) (*coderd.
filesRateLimit = -1
}
PrintLogo(inv)
PrintLogo(inv, "Coder")
logger, logCloser, err := BuildLogger(inv, cfg)
if err != nil {
return xerrors.Errorf("make logger: %w", err)
@@ -1333,13 +1333,15 @@ func newProvisionerDaemon(
}
// nolint: revive
func PrintLogo(inv *clibase.Invocation) {
func PrintLogo(inv *clibase.Invocation, daemonTitle string) {
// Only print the logo in TTYs.
if !isTTYOut(inv) {
return
}
_, _ = fmt.Fprintf(inv.Stdout, "%s - Your Self-Hosted Remote Development Platform\n", cliui.DefaultStyles.Bold.Render("Coder "+buildinfo.Version()))
versionString := cliui.DefaultStyles.Bold.Render(daemonTitle + " " + buildinfo.Version())
_, _ = fmt.Fprintf(inv.Stdout, "%s - Your Self-Hosted Remote Development Platform\n", versionString)
}
func loadCertificates(tlsCertFiles, tlsKeyFiles []string) ([]tls.Certificate, error) {
+1 -1
View File
@@ -108,7 +108,7 @@ func (*RootCmd) proxyServer() *clibase.Cmd {
go cli.DumpHandler(ctx)
cli.PrintLogo(inv)
cli.PrintLogo(inv, "Coder Workspace Proxy")
logger, logCloser, err := cli.BuildLogger(inv, cfg)
if err != nil {
return xerrors.Errorf("make logger: %w", err)