fix(realtime): noindex the socket server's 404 responses - #6129
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryLow Risk Overview Adds Reviewed by Cursor Bugbot for commit a256f7c. Configure here. |
Greptile SummaryThe PR adds an Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains.
|
| Filename | Overview |
|---|---|
| apps/realtime/src/routes/http.ts | Adds the crawler directive at the shared HTTP handler entry point so it applies consistently to every handled response. |
| apps/realtime/src/routes/http.test.ts | Adds focused handler tests for the crawler header and verifies existing health-check and unmatched-route status behavior remains unchanged. |
Reviews (2): Last reviewed commit: "fix(realtime): noindex every response, n..." | Re-trigger Greptile
The sockets.* hostnames are served by this server and return a plain JSON 404, which Google Search Console reports as crawl errors. Mark unmatched routes noindex so crawlers drop the hostnames instead of retrying them.
Setting the header only on the 404 fallback covered the one response that crawlers already drop on status code alone, while /health — the sole route returning 200 with a body, and so the only indexable surface on the socket hostnames — stayed uncovered, with a test pinning it that way. Set it once on the handler instead. Node merges setHeader values into writeHead and no branch sets X-Robots-Tag, so it reaches every response.
a256f7c to
88e8747
Compare
|
@cursor review |
1 similar comment
|
@cursor review |
Summary
sockets.*hostnames are served byapps/realtimeand return a plain JSON 404. Google Search Console reports these as crawl errors and keeps retrying them.X-Robots-Tag: noindex, nofollowon unmatched routes so crawlers drop the hostnames.Part of a wider SEO cleanup from a list of unused subdomains. The remaining items are infra-side (a Vercel wildcard DNS record, and an ALB redirect leaking
:443) and are not in this repo.Type of Change
Testing
Added
http.test.tscovering the handler. Verified the noindex test fails when the change is reverted, with the health-check assertion as a control that stays green. Full realtime suite passes (136 tests), lint and typecheck clean.Checklist