Browse Source

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

This makes it easier to use multiple instances on the same machine
master
Matthew Holt 6 years ago
parent
commit
8025ad9107
No known key found for this signature in database GPG Key ID: 2A349DD577D586A5
  1. 1
      modules/caddyhttp/fileserver/command.go
  2. 1
      modules/caddyhttp/reverseproxy/command.go

1
modules/caddyhttp/fileserver/command.go

@ -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),
},

1
modules/caddyhttp/reverseproxy/command.go

@ -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),
},

Loading…
Cancel
Save