cmd: Disable admin endpoint for file-server and reverse-proxy commands

This makes it easier to use multiple instances on the same machine
This commit is contained in:
Matthew Holt 2019-11-15 15:52:19 -07:00
parent 6cdb2392d7
commit 8025ad9107
No known key found for this signature in database
GPG Key ID: 2A349DD577D586A5
2 changed files with 2 additions and 0 deletions

View File

@ -92,6 +92,7 @@ func cmdFileServer(fs caddycmd.Flags) (int, error) {
}
cfg := &caddy.Config{
Admin: &caddy.AdminConfig{Disabled: true},
AppsRaw: map[string]json.RawMessage{
"http": caddyconfig.JSON(httpApp, nil),
},

View File

@ -137,6 +137,7 @@ func cmdReverseProxy(fs caddycmd.Flags) (int, error) {
}
cfg := &caddy.Config{
Admin: &caddy.AdminConfig{Disabled: true},
AppsRaw: map[string]json.RawMessage{
"http": caddyconfig.JSON(httpApp, nil),
},