mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
chore: server header specifies if wsproxy (#8432)
This commit is contained in:
+5
-3
@@ -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) {
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user