summaryrefslogtreecommitdiff
path: root/caddy.go
diff options
context:
space:
mode:
authorMatthew Holt <mholt@users.noreply.github.com>2020-03-06 23:15:25 -0700
committerMatthew Holt <mholt@users.noreply.github.com>2020-03-06 23:15:25 -0700
commitb8cba62643abf849411856bd92c42b59b98779f4 (patch)
tree518ddc4db0ce065353fd6f499c8eaf2975b65d13 /caddy.go
parent7cca291d62c910c0544f0c0169a8f0c81627e5d3 (diff)
Refactor for CertMagic v0.10; prepare for PKI app
This is a breaking change primarily in two areas: - Storage paths for certificates have changed - Slight changes to JSON config parameters Huge improvements in this commit, to be detailed more in the release notes. The upcoming PKI app will be powered by Smallstep libraries.
Diffstat (limited to 'caddy.go')
-rw-r--r--caddy.go14
1 files changed, 6 insertions, 8 deletions
diff --git a/caddy.go b/caddy.go
index dc4ea9e..e1539d7 100644
--- a/caddy.go
+++ b/caddy.go
@@ -32,7 +32,7 @@ import (
"sync"
"time"
- "github.com/mholt/certmagic"
+ "github.com/caddyserver/certmagic"
"go.uber.org/zap"
)
@@ -382,14 +382,12 @@ func run(newCfg *Config, start bool) error {
return err
}
- // Load, Provision, Validate each app and their submodules
+ // Load and Provision each app and their submodules
err = func() error {
- appsIface, err := ctx.LoadModule(newCfg, "AppsRaw")
- if err != nil {
- return fmt.Errorf("loading app modules: %v", err)
- }
- for appName, appIface := range appsIface.(map[string]interface{}) {
- newCfg.apps[appName] = appIface.(App)
+ for appName := range newCfg.AppsRaw {
+ if _, err := ctx.App(appName); err != nil {
+ return err
+ }
}
return nil
}()