gateway: alphabetize the displayed route table

Sort routes by address in GET /gateway and 'castle gateway status' (so the
dashboard + CLI tables read alphabetically). The Caddyfile keeps its
precedence-sensitive order — only the display is sorted.
This commit is contained in:
2026-06-14 22:21:25 -07:00
parent c40f84104d
commit 3100dff3a2
2 changed files with 5 additions and 2 deletions

View File

@@ -878,6 +878,8 @@ def get_gateway() -> GatewayInfo:
)
for r in compute_routes(registry, config, remote or None)
]
# Caddyfile order is precedence-sensitive; the displayed table is alphabetical.
routes.sort(key=lambda r: r.address)
return GatewayInfo(
port=registry.node.gateway_port,