Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(fastify): Dont fallback to index html if requesting static assets (…
…#9272) Attempts to fix an issue we found on teamstream with @KrisCoulson **The summary:** if you are requesting an asset (e.g. .js, jpeg, ico) file - we should _not_ respond with the index html. The response is meant to be for any routes that haven't been prerendered, and is an SPA fallback (so client side routing takes over). Because the 200 response here can get cached (intheory 200 means, all ok, so cloudflare or CDN would be correct to cache it), it can lead to problems where trying to load dynamically loaded chunks causes fatal errors. The change in this PR just throws a 404, when a .js file is being requested and it doesn't exist - mainly to prevent caching.
- Loading branch information