mirror of
https://github.com/caddyserver/caddy.git
synced 2026-05-28 01:32:30 -04:00
httpcaddyfile: Sort skip_hosts for deterministic JSON (#5990)
* httpcaddyfile: Sort skip_hosts for deterministic JSON * Update caddyconfig/httpcaddyfile/httptype.go Co-authored-by: Mohammed Al Sahaf <msaa1990@gmail.com> * Fix test * Bah --------- Co-authored-by: Mohammed Al Sahaf <msaa1990@gmail.com>
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user