mirror of
https://github.com/caddyserver/caddy.git
synced 2025-03-09 15:39:02 -04:00
noot
This commit is contained in:
parent
6e3abf388e
commit
447066e7c2
@ -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)
|
||||
}
|
||||
|
@ -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) },
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user