cmd: Use newly-available version information (#4931)

This commit is contained in:
Matt Holt
2022-08-04 11:16:59 -06:00
committed by GitHub
parent 1960a0dc11
commit 17ae5acaba
5 changed files with 103 additions and 69 deletions

View File

@ -94,10 +94,8 @@ func (t *Transport) Provision(ctx caddy.Context) error {
t.Root = "{http.vars.root}"
}
t.serverSoftware = "Caddy"
if mod := caddy.GoModule(); mod.Version != "" {
t.serverSoftware += "/" + mod.Version
}
version, _ := caddy.Version()
t.serverSoftware = "Caddy/" + version
// Set a relatively short default dial timeout.
// This is helpful to make load-balancer retries more speedy.