Vite-ssr-boost adds request guard to block junk paths before React renders
The latest release of vite-ssr-boost introduces a document guard that intercepts invalid or irrelevant requests—such as those for /.env or random PHP files—before the React rendering pipeline is triggered. By default, unsupported HTTP methods receive a 405 response, oversized URLs get a 414, and malformed paths return a 400, all without invoking route loaders or the SSR render process. Unmatched document paths return a plain 404, while matched resource routes like /sitemap.xml are still allowed through. The update also adds an opt-in SSR concurrency limiter that returns a 503 with a Retry-After header when the server is at capacity, with no queue involved. Additionally, a new HTML cache for missing pages can buffer and reuse rendered 404 responses across concurrent requests, though it is automatically disabled when a CSP nonce is configured.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.



Discussion (0)
Log in to join the discussion and vote.
Log in