mirror of https://github.com/caddyserver/caddy.git
httpcaddyfile: Reorder automation policy logic (close #3550)
This commit is contained in:
parent
2a5599e2ad
commit
7bfe5b6c95
|
@ -321,6 +321,9 @@ func (st ServerType) buildTLSApp(
|
||||||
|
|
||||||
// do a little verification & cleanup
|
// do a little verification & cleanup
|
||||||
if tlsApp.Automation != nil {
|
if tlsApp.Automation != nil {
|
||||||
|
// consolidate automation policies that are the exact same
|
||||||
|
tlsApp.Automation.Policies = consolidateAutomationPolicies(tlsApp.Automation.Policies)
|
||||||
|
|
||||||
// ensure automation policies don't overlap subjects (this should be
|
// ensure automation policies don't overlap subjects (this should be
|
||||||
// an error at provision-time as well, but catch it in the adapt phase
|
// an error at provision-time as well, but catch it in the adapt phase
|
||||||
// for convenience)
|
// for convenience)
|
||||||
|
@ -333,9 +336,6 @@ func (st ServerType) buildTLSApp(
|
||||||
automationHostSet[s] = struct{}{}
|
automationHostSet[s] = struct{}{}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// consolidate automation policies that are the exact same
|
|
||||||
tlsApp.Automation.Policies = consolidateAutomationPolicies(tlsApp.Automation.Policies)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return tlsApp, warnings, nil
|
return tlsApp, warnings, nil
|
||||||
|
|
Loading…
Reference in New Issue