Walk a Caddy routes[] tree (or any nested fragment) and collect every
non-internal hostname referenced in match[].host[].
Recurses into Caddy's subroute handler shape, where nested routes
live at handle[].routes[]. Hostnames Caddy already treats as internal
(localhost, *.localhost, .localhost suffixes, literal IPs) are
filtered out — see isInternalHost.
Useful as input to buildAutomaticHttpsConfig when you want
automatic_https.skip to mirror the actual route topology rather than
a fixed list maintained somewhere else.
Parameters
routes: unknown
A Caddy server.routes array (or any nested fragment).
Returns string[]
Sorted, de-duplicated list of non-internal hostnames.
Walk a Caddy
routes[]tree (or any nested fragment) and collect every non-internal hostname referenced inmatch[].host[].Recurses into Caddy's
subroutehandler shape, where nested routes live athandle[].routes[]. Hostnames Caddy already treats as internal (localhost,*.localhost,.localhostsuffixes, literal IPs) are filtered out — see isInternalHost.Useful as input to buildAutomaticHttpsConfig when you want
automatic_https.skipto mirror the actual route topology rather than a fixed list maintained somewhere else.