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)}) {
|
if !reflect.DeepEqual(pkiApp, &caddypki.PKI{CAs: make(map[string]*caddypki.CA)}) {
|
||||||
cfg.AppsRaw["pki"] = caddyconfig.JSON(pkiApp, &warnings)
|
cfg.AppsRaw["pki"] = caddyconfig.JSON(pkiApp, &warnings)
|
||||||
}
|
}
|
||||||
if filesystems, ok := options["filesystem"].(caddy.Module); ok {
|
if filesystems, ok := options["file_systems"].(caddy.Module); ok {
|
||||||
cfg.AppsRaw["filesystems"] = caddyconfig.JSON(
|
cfg.AppsRaw["file_systems"] = caddyconfig.JSON(
|
||||||
filesystems,
|
filesystems,
|
||||||
&warnings)
|
&warnings)
|
||||||
}
|
}
|
||||||
|
@ -15,7 +15,7 @@ import (
|
|||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
caddy.RegisterModule(Filesystems{})
|
caddy.RegisterModule(Filesystems{})
|
||||||
httpcaddyfile.RegisterGlobalOption("filesystem", parseFilesystems)
|
httpcaddyfile.RegisterGlobalOption("file_systems", parseFilesystems)
|
||||||
}
|
}
|
||||||
|
|
||||||
type moduleEntry struct {
|
type moduleEntry struct {
|
||||||
@ -26,7 +26,7 @@ type moduleEntry struct {
|
|||||||
|
|
||||||
// Filesystems loads caddy.fs modules into the global filesystem map
|
// Filesystems loads caddy.fs modules into the global filesystem map
|
||||||
type Filesystems struct {
|
type Filesystems struct {
|
||||||
Filesystems []*moduleEntry `json:"filesystems"`
|
Filesystems []*moduleEntry `json:"file_systems"`
|
||||||
|
|
||||||
defers []func()
|
defers []func()
|
||||||
}
|
}
|
||||||
@ -49,7 +49,7 @@ func parseFilesystems(d *caddyfile.Dispenser, existingVal any) (any, error) {
|
|||||||
// CaddyModule returns the Caddy module information.
|
// CaddyModule returns the Caddy module information.
|
||||||
func (Filesystems) CaddyModule() caddy.ModuleInfo {
|
func (Filesystems) CaddyModule() caddy.ModuleInfo {
|
||||||
return caddy.ModuleInfo{
|
return caddy.ModuleInfo{
|
||||||
ID: "filesystems",
|
ID: "file_systems",
|
||||||
New: func() caddy.Module { return new(Filesystems) },
|
New: func() caddy.Module { return new(Filesystems) },
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user