Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions apps/server/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,12 @@ function isAllowedHost(hostHeader: string | undefined): boolean {

const allowedHostnames = new Set(['localhost', '127.0.0.1', '[::1]']);
if (isCloud) {
// Railway's own internal healthcheck probe - sent with this fixed Host
// regardless of the service's actual public domain. Without it, Railway
// can never see this deployment as healthy and rolls back to the last
// one that could - this rule shipped once and immediately took down every
// deploy after it.
allowedHostnames.add('healthcheck.railway.app');
for (const domain of [process.env.RAILWAY_PUBLIC_DOMAIN, process.env.RAILWAY_STATIC_URL]) {
if (domain) allowedHostnames.add(domain.replace(/^https?:\/\//, ''));
}
Expand Down
Loading