Skip to content

fix(server): allow Railway's healthcheck Host header - #7

Merged
harrymove-ctrl merged 1 commit into
masterfrom
fix/railway-healthcheck-host
Jul 31, 2026
Merged

fix(server): allow Railway's healthcheck Host header#7
harrymove-ctrl merged 1 commit into
masterfrom
fix/railway-healthcheck-host

Conversation

@harrymove-ctrl

Copy link
Copy Markdown
Owner

Summary

Fixes a deploy-breaking regression from the security-hardening PR (#5): the new Host-header validation didn't recognize Railway's own healthcheck probe (Host: healthcheck.railway.app), so it 421'd on every healthcheck and Railway rolled every subsequent deploy back to the last one that could pass it.

Impact: confirmed via railway logs/railway status that production has been running the pre-security-hardening build (from PR #4, July 30 13:51 UTC) this whole time — PR #5's and PR #6's deploys both built successfully but never actually went live.

Test plan

  • Verified locally with RAILWAY_SERVICE_ID set to force the cloud code path: Host: healthcheck.railway.app → 200, Host: evil.com → still 421

…y since the pairing PR

The Host-header validation added in the security-hardening PR (d5e5fd9)
only allowed localhost/127.0.0.1/[::1] and the deployment's own public
domain. Railway's own healthcheck probe sends requests with a fixed,
unrelated Host - healthcheck.railway.app - which that check had no reason
to know about, so every healthcheck since that PR shipped got a 421 and
Railway rolled the deploy back to the last one that could pass it.

Confirmed via `railway logs`: the currently-active deployment is still
from July 30 13:51 UTC (the Move Studio PR, #4) - both the security PR
(#5) and the changelog PR (#6) built and pushed successfully but never
went live, because their new server code rejected the one request that
decides whether a deploy survives.

Verified locally with RAILWAY_SERVICE_ID set (forces the cloud code path):
Host: healthcheck.railway.app -> 200; Host: evil.com -> still 421.
@harrymove-ctrl
harrymove-ctrl merged commit dce30c8 into master Jul 31, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants