@marcel91200 / caddy Mirror · read-only / commits / ce5a45db
Fork 0

Fast and extensible multi-platform HTTP/1-2-3 web server with automatic HTTPS

Mirrored from https://github.com/Slazee/caddy.git

Synced Nov 14, 05:15 UTC

cmd: Fix paths when using an env file (#4296)

* core: Fix paths when using an env file * refactor: move path logic to loadFromEnv

Pascal Zarrad committed Aug 20, 2021 at 23:51 UTC ce5a45db458166ff71cb776d70fd63e28196aafa
1 file changed +5
cmd/main.go
+5
@@ -361,6 +361,11 @@ func loadEnvFromFile(envFile string) error {
361 }
362 }
363
364 + // Update the storage paths to ensure they have the proper
365 + // value after loading a specified env file.
366 + caddy.ConfigAutosavePath = filepath.Join(caddy.AppConfigDir(), "autosave.json")
367 + caddy.DefaultStorage = &certmagic.FileStorage{Path: caddy.AppDataDir()}
368 +
369 return nil
370 }
371