Retire the fleet's legacy vhost, now Cloudflare routes that name - #398
Conversation
${HOST_LEGACY_REDIRECT} existed to proxy tower-finder.retina.fm, the name the
fleet calls, to tower-finder-service. Since the origin flip of 2026-09-14
Cloudflare sends that name to the service's own edge on 8443, so nothing
reaches this vhost and it is dead weight.
Held back from the UI removal it was originally part of, because it carries a
risk that change does not. Until this merges, deleting the Cloudflare origin
rule is a working rollback: the name lands here and this vhost proxies it on.
Afterwards it is not, and worse than merely absent. The template declares no
default_server on 443, so nginx falls back to the FIRST 443 block, which is the
towers SPA. A node calling /api/towers would then be answered with an HTML page
and a 200, and fail on decode rather than on a status it can branch on.
Merge this only once the flip is trusted enough to give that rollback up. A
catch-all default_server that refused unmatched hostnames outright would turn
the failure loud, and is worth doing, but it changes behaviour for every
unmatched name rather than this one and belongs in its own change.
EXPECTED_TLS_VHOSTS drops 8 to 7 alongside the removed vhost; it is hardcoded
and fails all three environments at once if left behind.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
Claude finished @Babissimo's task in 1m 25s —— View job Review: Retire the fleet's legacy vhost
Summary: Clean, well-scoped removal. I traced every reference to
Risk called out in the PR body is real and correctly assessed: I confirmed No bugs, no inconsistencies, no dead code left behind. I wasn't able to execute |
Ticket: https://app.clickup.com/t/123zgec2zw1
Supersedes #391, which GitHub auto-closed when its base branch was deleted by #389's merge. Same commit, rebased onto
mainwithgit rebase --onto; no longer stacked.What this does
${HOST_LEGACY_REDIRECT}proxiedtower-finder.retina.fm, the name the fleet calls, to tower-finder-service. Since the origin flip of 2026-09-14 Cloudflare sends that name straight to the service's own edge on 8443, so nothing reaches this vhost. It goes, along with the variable in all four compose overlays, the substitution allowlist, the test fixtures, and theHOST_LEGACY_REDIRECTexemption intest_towers_vhost_coverage.py.EXPECTED_TLS_VHOSTSdrops 8 to 7. It is hardcoded, and left behind it fails parity on all three environments at once.What merging this costs
Held back from #389 deliberately, because it carries a risk the UI removal did not.
Until this merges, deleting the Cloudflare origin rule is a working rollback:
tower-finder.retina.fmlands on this repo's nginx on 443 and this vhost proxies it to the service. Afterwards that rollback is not merely unavailable, it is harmful. The template declares nodefault_serveron 443 (the_catch-all is only in the port-80 redirect list), so nginx falls back to the first 443 server block, which is the towers SPA. A node calling/api/towerswould get an HTML page with a 200 and fail on decode rather than on a status it can branch on.Merging is therefore a decision to give that rollback up. The flip has been live and verified since 2026-09-14.
Worth doing separately
A catch-all
default_serveron 443 refusing unmatched hostnames would turn that failure loud rather than silent, and is worth having regardless. Not included here because it changes behaviour for every unmatched name, not just this one.Verification (re-run after the rebase, not carried over)
pre-commit run --all-filespasses.test_towers_vhost_coverage.pyandtest_nginx_rewrite_ordering.pypass (8 tests) against the sharednginx_helpersfixture with the variable removed.deploy/check-env-parity.pypasses; staging and test in parity with production.nginx -t("syntax is ok") and renders 7 TLS vhosts.HOST_LEGACY_REDIRECTreturns nothing.🤖 Generated with Claude Code