Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit85affd4

Browse files
committed
chore: cleanup unused Client in server command
1 parente9af6ff commit85affd4

File tree

1 file changed

+1
-14
lines changed

1 file changed

+1
-14
lines changed

‎cli/server.go‎

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -969,23 +969,10 @@ func (r *RootCmd) Server(newAPI func(context.Context, *coderd.Options) (*coderd.
969969
}
970970
}
971971

972-
client:=codersdk.New(localURL)
973-
iflocalURL.Scheme=="https"&&IsLocalhost(localURL.Hostname()) {
974-
// The certificate will likely be self-signed or for a different
975-
// hostname, so we need to skip verification.
976-
client.HTTPClient.Transport=&http.Transport{
977-
TLSClientConfig:&tls.Config{
978-
//nolint:gosec
979-
InsecureSkipVerify:true,
980-
},
981-
}
982-
}
983-
deferclient.HTTPClient.CloseIdleConnections()
984-
985972
// This is helpful for tests, but can be silently ignored.
986973
// Coder may be ran as users that don't have permission to write in the homedir,
987974
// such as via the systemd service.
988-
err=config.URL().Write(client.URL.String())
975+
err=config.URL().Write(localURL.String())
989976
iferr!=nil&&flag.Lookup("test.v")!=nil {
990977
returnxerrors.Errorf("write config url: %w",err)
991978
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp