summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--caddyconfig/httpcaddyfile/httptype.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/caddyconfig/httpcaddyfile/httptype.go b/caddyconfig/httpcaddyfile/httptype.go
index cfb3121..8c10a53 100644
--- a/caddyconfig/httpcaddyfile/httptype.go
+++ b/caddyconfig/httpcaddyfile/httptype.go
@@ -327,7 +327,11 @@ func (st ServerType) Setup(originalServerBlocks []caddyfile.ServerBlock,
&warnings)
}
if adminConfig, ok := options["admin"].(string); ok && adminConfig != "" {
- cfg.Admin = &caddy.AdminConfig{Listen: adminConfig}
+ if adminConfig == "off" {
+ cfg.Admin = &caddy.AdminConfig{Disabled: true}
+ } else {
+ cfg.Admin = &caddy.AdminConfig{Listen: adminConfig}
+ }
}
if len(customLogs) > 0 {
if cfg.Logging == nil {