Skip to content

Commit

Permalink
httpcaddyfile: Reorder automation policy logic (close #3550)
Browse files Browse the repository at this point in the history
  • Loading branch information
mholt committed Jul 7, 2020
1 parent 2a5599e commit 7bfe5b6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions caddyconfig/httpcaddyfile/tlsapp.go
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,9 @@ func (st ServerType) buildTLSApp(

// do a little verification & cleanup
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
// an error at provision-time as well, but catch it in the adapt phase
// for convenience)
Expand All @@ -333,9 +336,6 @@ func (st ServerType) buildTLSApp(
automationHostSet[s] = struct{}{}
}
}

// consolidate automation policies that are the exact same
tlsApp.Automation.Policies = consolidateAutomationPolicies(tlsApp.Automation.Policies)
}

return tlsApp, warnings, nil
Expand Down

0 comments on commit 7bfe5b6

Please sign in to comment.