Normalize domain before managing

Fix github.com/caddyserver/caddy/issues/6456
This commit is contained in:
Matthew Holt 2024-07-22 08:53:24 -06:00
parent 16e2e0b344
commit 1ff1ad8413
No known key found for this signature in database
GPG Key ID: 2A349DD577D586A5

View File

@ -370,9 +370,11 @@ func (cfg *Config) manageAll(ctx context.Context, domainNames []string, async bo
}
for _, domainName := range domainNames {
domainName = normalizedName(domainName)
// if on-demand is configured, defer obtain and renew operations
if cfg.OnDemand != nil {
cfg.OnDemand.hostAllowlist[normalizedName(domainName)] = struct{}{}
cfg.OnDemand.hostAllowlist[domainName] = struct{}{}
continue
}