summaryrefslogtreecommitdiff
path: root/modules/caddytls/tls.go
diff options
context:
space:
mode:
authorMatthew Holt <mholt@users.noreply.github.com>2020-01-06 08:10:20 -0700
committerMatthew Holt <mholt@users.noreply.github.com>2020-01-06 08:10:20 -0700
commit5c99267dd870936a02f942130302b76b1f15efa2 (patch)
tree17bddda28cd22facf4cc3a3d801aabeef6e4d83c /modules/caddytls/tls.go
parenta6df4cdbbca673bf3a2ff1bc2369a887c6953b93 (diff)
A few miscellaneous, minor fixes
Diffstat (limited to 'modules/caddytls/tls.go')
-rw-r--r--modules/caddytls/tls.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/modules/caddytls/tls.go b/modules/caddytls/tls.go
index 1b155b0..f9beb6f 100644
--- a/modules/caddytls/tls.go
+++ b/modules/caddytls/tls.go
@@ -107,10 +107,10 @@ func (t *TLS) Provision(ctx caddy.Context) error {
// special case; these will be loaded in later
// using our automation facilities, which we
// want to avoid during provisioning
- var ok bool
- t.automateNames, ok = modIface.([]string)
- if !ok {
- return fmt.Errorf("loading certificates with 'automate' requires []string, got: %#v", modIface)
+ if automateNames, ok := modIface.(*AutomateLoader); ok && automateNames != nil {
+ t.automateNames = []string(*automateNames)
+ } else {
+ return fmt.Errorf("loading certificates with 'automate' requires array of strings, got: %T", modIface)
}
continue
}