summaryrefslogtreecommitdiffhomepage
path: root/caddy.go
diff options
context:
space:
mode:
authora <[email protected]>2024-01-13 14:12:43 -0600
committerGitHub <[email protected]>2024-01-13 20:12:43 +0000
commitc839a98ff527932fd14460829142c486f4531a7b (patch)
tree3a4a9745d2bc54ff557b4439ea0fe2dbc58238e0 /caddy.go
parentb359ca565c624b8718eac79058bff0591b250d0e (diff)
downloadcaddy-c839a98ff527932fd14460829142c486f4531a7b.tar.gz
caddy-c839a98ff527932fd14460829142c486f4531a7b.zip
filesystem: Globally declared filesystems, `fs` directive (#5833)
Diffstat (limited to 'caddy.go')
-rw-r--r--caddy.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/caddy.go b/caddy.go
index cd8af5fe2..92a1fdf2f 100644
--- a/caddy.go
+++ b/caddy.go
@@ -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)