mirror of
https://github.com/caddyserver/caddy.git
synced 2026-05-13 10:42:16 -04:00
caddytls: Move config of certmagic storage to NewConfig (fixes #2465)
Breaking API change for server type plugins that use caddytls package. Now an error value is returned from NewConfig as well. Sorry about that.
This commit is contained in:
@@ -190,7 +190,10 @@ func (h *httpContext) InspectServerBlocks(sourceFile string, serverBlocks []cadd
|
||||
// Make our caddytls.Config, which has a pointer to the
|
||||
// instance's certificate cache and enough information
|
||||
// to use automatic HTTPS when the time comes
|
||||
caddytlsConfig := caddytls.NewConfig(h.instance)
|
||||
caddytlsConfig, err := caddytls.NewConfig(h.instance)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("creating new caddytls configuration: %v", err)
|
||||
}
|
||||
caddytlsConfig.Hostname = addr.Host
|
||||
caddytlsConfig.Manager.AltHTTPPort = altHTTPPort
|
||||
caddytlsConfig.Manager.AltTLSALPNPort = altTLSALPNPort
|
||||
|
||||
Reference in New Issue
Block a user