feat(seo): return a real 404 status for unmatched routes

This commit is contained in:
2026-08-02 10:23:07 +02:00
parent b2636e20cf
commit c07663aa7b
2 changed files with 17 additions and 1 deletions
+1 -1
View File
@@ -270,7 +270,7 @@ export function createApp(config, prisma) {
})
);
app.get(/^\/(?!api\/).*/, (req, res) => {
res.sendFile(path.join(frontendDist, 'index.html'));
res.status(404).sendFile(path.join(frontendDist, '404', 'index.html'));
});
app.use((err, req, res, next) => {