feat(seo): return a real 404 status for unmatched routes
This commit is contained in:
+1
-1
@@ -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) => {
|
||||
|
||||
Reference in New Issue
Block a user