Fast and extensible multi-platform HTTP/1-2-3 web server with automatic HTTPS
Mirrored from https://github.com/Slazee/caddy.git
Synced Nov 12, 22:00 UTC
httpcaddyfile: Sort TLS SNI matcher for deterministic JSON output (#5860)
* httpcaddyfile: Sort TLS SNI matcher, for deterministic adapt output * Update caddyconfig/httpcaddyfile/httptype.go --------- Co-authored-by: Matt Holt <mholt@users.noreply.github.com>
Francis Lavoie committed
Oct 11, 2023 at 11:47 UTC
33d8d2c6b5e070d108d69853b8d56fb2f89a1f31
1 file changed
+1
caddyconfig/httpcaddyfile/httptype.go
+1
@@ -685,6 +685,7 @@ func (st *ServerType) serversFromPairings(
685
}
686
687
if len(hosts) > 0 {
688
+ slices.Sort(hosts) // for deterministic JSON output
689
cp.MatchersRaw = caddy.ModuleMap{
690
"sni": caddyconfig.JSON(hosts, warnings), // make sure to match all hosts, not just auto-HTTPS-qualified ones
691
}