You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
0 commit comments