From 0433f9d075452d78ac93c72bad37856dc1b5b6f7 Mon Sep 17 00:00:00 2001 From: Matthew Holt Date: Sun, 15 Mar 2020 21:22:26 -0600 Subject: caddytls: Clean up some code related to automation --- modules/caddyhttp/autohttps.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'modules/caddyhttp/autohttps.go') diff --git a/modules/caddyhttp/autohttps.go b/modules/caddyhttp/autohttps.go index 2c35da8..dfd659f 100644 --- a/modules/caddyhttp/autohttps.go +++ b/modules/caddyhttp/autohttps.go @@ -235,7 +235,7 @@ uniqueDomainsLoop: // one automation policy would be confusing and an error if app.tlsApp.Automation != nil { for _, ap := range app.tlsApp.Automation.Policies { - for _, apHost := range ap.Hosts { + for _, apHost := range ap.Subjects { if apHost == d { continue uniqueDomainsLoop } @@ -424,7 +424,7 @@ func (app *App) createAutomationPolicies(ctx caddy.Context, publicNames, interna // custom CA endpoint, for example - whichever one we choose must // have a host list that is a superset of the policy we make... // the policy with no host filter is guaranteed to qualify - if len(ap.Hosts) == 0 { + if len(ap.Subjects) == 0 { basePolicy = ap break } @@ -451,7 +451,7 @@ func (app *App) createAutomationPolicies(ctx caddy.Context, publicNames, interna } } newPolicy.Issuer = issuer - newPolicy.Hosts = hosts + newPolicy.Subjects = hosts return app.tlsApp.AddAutomationPolicy(newPolicy) } -- cgit v1.2.3