From 5c99267dd870936a02f942130302b76b1f15efa2 Mon Sep 17 00:00:00 2001 From: Matthew Holt Date: Mon, 6 Jan 2020 08:10:20 -0700 Subject: A few miscellaneous, minor fixes --- modules/caddytls/acmemanager.go | 2 +- modules/caddytls/tls.go | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'modules/caddytls') diff --git a/modules/caddytls/acmemanager.go b/modules/caddytls/acmemanager.go index 31c954f..8e60183 100644 --- a/modules/caddytls/acmemanager.go +++ b/modules/caddytls/acmemanager.go @@ -78,7 +78,7 @@ type ACMEManagerMaker struct { // Optionally configure a separate storage module associated with this // manager, instead of using Caddy's global/default-configured storage. - Storage json.RawMessage `json:"storage,omitempty"` + Storage json.RawMessage `json:"storage,omitempty" caddy:"namespace=caddy.storage inline_key=module"` // An array of files of CA certificates to accept when connecting to the // ACME CA. Generally, you should only use this if the ACME CA endpoint 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 } -- cgit v1.2.3