mirror of
https://github.com/caddyserver/caddy.git
synced 2025-06-23 17:11:27 +08:00
Scope TLS max_certs to site config instead of global
This commit is contained in:
@ -156,9 +156,7 @@ func setupTLS(c *caddy.Controller) error {
|
||||
if err != nil || maxCertsNum < 1 {
|
||||
return c.Err("max_certs must be a positive integer")
|
||||
}
|
||||
if onDemandMaxIssue == 0 || int32(maxCertsNum) < onDemandMaxIssue { // keep the minimum; TODO: We have to do this because it is global; should be per-server or per-vhost...
|
||||
onDemandMaxIssue = int32(maxCertsNum)
|
||||
}
|
||||
config.OnDemandState.MaxObtain = int32(maxCertsNum)
|
||||
}
|
||||
|
||||
// don't try to load certificates unless we're supposed to
|
||||
|
Reference in New Issue
Block a user