Skip to content

Fix/status page forwarded host routing#1977

Open
aiokaizen wants to merge 4 commits intoopenstatusHQ:mainfrom
aiokaizen:fix/status-page-forwarded-host-routing
Open

Fix/status page forwarded host routing#1977
aiokaizen wants to merge 4 commits intoopenstatusHQ:mainfrom
aiokaizen:fix/status-page-forwarded-host-routing

Conversation

@aiokaizen
Copy link

  • Fixes custom-domain routing for self-hosted status pages behind a reverse proxy.
  • The status-page app was reading x-forwarded-host, but then still derived subdomain from url.host.
  • In self-hosted Docker deployments, url.host is the container host (0.0.0.0:3000 / localhost:3000), not the public domain.
  • That caused the resolved routing prefix to be overwritten with the container host, breaking custom-domain routing.
  • Result: requests for domains like status.pinbridge.io could fall back to the public root/theme-builder flow instead of the intended status page.
  • This patch introduces effectiveHost = x-forwarded-host ?? url.host and uses it consistently for:
    • hostname splitting
    • subdomain detection
    • .vercel.app checks
  • Updated files:
    • apps/status-page/src/proxy.ts
    • apps/status-page/src/lib/domain.ts
  • This is especially important for self-hosted setups behind nginx or another reverse proxy that forwards the public host.
  • No version changes included.

@vercel
Copy link

vercel bot commented Mar 13, 2026

@aiokaizen is attempting to deploy a commit to the OpenStatus Team on Vercel.

A member of the Team first needs to authorize it.

@vercel
Copy link

vercel bot commented Mar 13, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
openstatus-dashboard Ready Ready Preview, Comment Mar 13, 2026 10:44am
openstatus-status-page Ready Ready Preview, Comment Mar 13, 2026 10:44am
openstatus-web Ready Ready Preview, Comment Mar 13, 2026 10:44am

Request Review

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.

1 participant