diff options
author | a <[email protected]> | 2024-01-13 14:12:43 -0600 |
---|---|---|
committer | GitHub <[email protected]> | 2024-01-13 20:12:43 +0000 |
commit | c839a98ff527932fd14460829142c486f4531a7b (patch) | |
tree | 3a4a9745d2bc54ff557b4439ea0fe2dbc58238e0 /caddy.go | |
parent | b359ca565c624b8718eac79058bff0591b250d0e (diff) | |
download | caddy-c839a98ff527932fd14460829142c486f4531a7b.tar.gz caddy-c839a98ff527932fd14460829142c486f4531a7b.zip |
filesystem: Globally declared filesystems, `fs` directive (#5833)
Diffstat (limited to 'caddy.go')
-rw-r--r-- | caddy.go | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -39,6 +39,7 @@ import ( "github.com/google/uuid" "go.uber.org/zap" + "github.com/caddyserver/caddy/v2/internal/filesystems" "github.com/caddyserver/caddy/v2/notify" ) @@ -84,6 +85,9 @@ type Config struct { storage certmagic.Storage cancelFunc context.CancelFunc + + // filesystems is a dict of filesystems that will later be loaded from and added to. + filesystems FileSystems } // App is a thing that Caddy runs. @@ -447,6 +451,9 @@ func run(newCfg *Config, start bool) (Context, error) { } } + // create the new filesystem map + newCfg.filesystems = &filesystems.FilesystemMap{} + // prepare the new config for use newCfg.apps = make(map[string]App) |