This commit is contained in:
a 2024-09-17 16:28:33 -05:00
parent 6e3abf388e
commit 447066e7c2
No known key found for this signature in database
GPG Key ID: 374BC539FE795AF0
2 changed files with 5 additions and 5 deletions

View File

@ -274,8 +274,8 @@ func (st ServerType) Setup(
if !reflect.DeepEqual(pkiApp, &caddypki.PKI{CAs: make(map[string]*caddypki.CA)}) {
cfg.AppsRaw["pki"] = caddyconfig.JSON(pkiApp, &warnings)
}
if filesystems, ok := options["filesystem"].(caddy.Module); ok {
cfg.AppsRaw["filesystems"] = caddyconfig.JSON(
if filesystems, ok := options["file_systems"].(caddy.Module); ok {
cfg.AppsRaw["file_systems"] = caddyconfig.JSON(
filesystems,
&warnings)
}

View File

@ -15,7 +15,7 @@ import (
func init() {
caddy.RegisterModule(Filesystems{})
httpcaddyfile.RegisterGlobalOption("filesystem", parseFilesystems)
httpcaddyfile.RegisterGlobalOption("file_systems", parseFilesystems)
}
type moduleEntry struct {
@ -26,7 +26,7 @@ type moduleEntry struct {
// Filesystems loads caddy.fs modules into the global filesystem map
type Filesystems struct {
Filesystems []*moduleEntry `json:"filesystems"`
Filesystems []*moduleEntry `json:"file_systems"`
defers []func()
}
@ -49,7 +49,7 @@ func parseFilesystems(d *caddyfile.Dispenser, existingVal any) (any, error) {
// CaddyModule returns the Caddy module information.
func (Filesystems) CaddyModule() caddy.ModuleInfo {
return caddy.ModuleInfo{
ID: "filesystems",
ID: "file_systems",
New: func() caddy.Module { return new(Filesystems) },
}
}