Don't return 404, just return the index (some routes look like asset files since tlds look like file extensions)

This commit is contained in:
Jon Staab
2026-06-04 13:32:55 -07:00
parent 4d57e4e6ed
commit cdc9f927b5
-6
View File
@@ -262,12 +262,6 @@ app.use(
// SPA fallback for routes that don't match static files
app.get("*", async context => {
const requestUrl = requestUrlFromContext(context)
// If the path has an extension, it's likely a missing static asset, not an SPA route
if (path.extname(requestUrl.pathname)) {
return context.text("Not found", 404)
}
const metadata = await getMetadataForRoute(requestUrl)
const html = metadata ? injectMeta(metadata) : TEMPLATE_HTML