aboutsummaryrefslogtreecommitdiffhomepage
path: root/caddy.go
diff options
context:
space:
mode:
authorMatthew Holt <[email protected]>2020-03-06 23:24:09 -0700
committerMatthew Holt <[email protected]>2020-03-06 23:26:13 -0700
commitb216d285dfe8784796d3f6597545c59aa4bec279 (patch)
tree92a949a75c1460b0aabac97c7d2831222d91a460 /caddy.go
parent3f5d27cd5da8f3ad53e4b794d34703922c9b824e (diff)
parentb8cba62643abf849411856bd92c42b59b98779f4 (diff)
downloadcaddy-b216d285dfe8784796d3f6597545c59aa4bec279.tar.gz
caddy-b216d285dfe8784796d3f6597545c59aa4bec279.zip
Merge branch 'certmagic-refactor' into v2
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 d4c35a9dd..1f9018a18 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
}()