diff options
author | Matthew Holt <[email protected]> | 2020-03-06 23:15:25 -0700 |
---|---|---|
committer | Matthew Holt <[email protected]> | 2020-03-06 23:15:25 -0700 |
commit | b8cba62643abf849411856bd92c42b59b98779f4 (patch) | |
tree | 518ddc4db0ce065353fd6f499c8eaf2975b65d13 /caddy.go | |
parent | 7cca291d62c910c0544f0c0169a8f0c81627e5d3 (diff) | |
download | caddy-b8cba62643abf849411856bd92c42b59b98779f4.tar.gz caddy-b8cba62643abf849411856bd92c42b59b98779f4.zip |
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.go | 14 |
1 files changed, 6 insertions, 8 deletions
@@ -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 }() |