summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--caddyconfig/httpcaddyfile/httptype.go5
-rw-r--r--caddytest/integration/caddyfile_adapt/log_skip_hosts.txt4
2 files changed, 7 insertions, 2 deletions
diff --git a/caddyconfig/httpcaddyfile/httptype.go b/caddyconfig/httpcaddyfile/httptype.go
index c82d92efc..cb3095a16 100644
--- a/caddyconfig/httpcaddyfile/httptype.go
+++ b/caddyconfig/httpcaddyfile/httptype.go
@@ -820,6 +820,11 @@ func (st *ServerType) serversFromPairings(
}
}
+ // sort for deterministic JSON output
+ if srv.Logs != nil {
+ slices.Sort(srv.Logs.SkipHosts)
+ }
+
// a server cannot (natively) serve both HTTP and HTTPS at the
// same time, so make sure the configuration isn't in conflict
err := detectConflictingSchemes(srv, p.serverBlocks, options)
diff --git a/caddytest/integration/caddyfile_adapt/log_skip_hosts.txt b/caddytest/integration/caddyfile_adapt/log_skip_hosts.txt
index 25e4bd1c2..8fdd57156 100644
--- a/caddytest/integration/caddyfile_adapt/log_skip_hosts.txt
+++ b/caddytest/integration/caddyfile_adapt/log_skip_hosts.txt
@@ -66,9 +66,9 @@ example.com {
"one.example.com": ""
},
"skip_hosts": [
+ "example.com",
"three.example.com",
- "two.example.com",
- "example.com"
+ "two.example.com"
]
}
}