summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--admin_test.go2
-rw-r--r--caddyconfig/httpcaddyfile/serveroptions.go2
-rw-r--r--caddytest/integration/caddyfile_adapt/global_server_options_single.txt2
3 files changed, 3 insertions, 3 deletions
diff --git a/admin_test.go b/admin_test.go
index d53988b..04aa886 100644
--- a/admin_test.go
+++ b/admin_test.go
@@ -161,7 +161,7 @@ func (fooModule) Stop() error { return nil }
func TestETags(t *testing.T) {
RegisterModule(fooModule{})
- if err := Load([]byte(`{"apps": {"foo": {"strField": "abc", "intField": 0}}}`), true); err != nil {
+ if err := Load([]byte(`{"admin": {"listen": "localhost:2999"}, "apps": {"foo": {"strField": "abc", "intField": 0}}}`), true); err != nil {
t.Fatalf("loading: %s", err)
}
diff --git a/caddyconfig/httpcaddyfile/serveroptions.go b/caddyconfig/httpcaddyfile/serveroptions.go
index 8e021fd..8ab8969 100644
--- a/caddyconfig/httpcaddyfile/serveroptions.go
+++ b/caddyconfig/httpcaddyfile/serveroptions.go
@@ -162,7 +162,7 @@ func unmarshalCaddyfileServerOptions(d *caddyfile.Dispenser) (any, error) {
}
serverOpts.Protocols = append(serverOpts.Protocols, proto)
}
- if d.NextBlock(0) {
+ if nesting := d.Nesting(); d.NextBlock(nesting) {
return nil, d.ArgErr()
}
diff --git a/caddytest/integration/caddyfile_adapt/global_server_options_single.txt b/caddytest/integration/caddyfile_adapt/global_server_options_single.txt
index cfe6bfd..5fb6739 100644
--- a/caddytest/integration/caddyfile_adapt/global_server_options_single.txt
+++ b/caddytest/integration/caddyfile_adapt/global_server_options_single.txt
@@ -12,8 +12,8 @@
}
max_header_size 100MB
log_credentials
- strict_sni_host
protocols h1 h2 h2c h3
+ strict_sni_host
}
}