mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-01-23 07:53:00 +01:00
fix another crash
This commit is contained in:
@@ -174,7 +174,7 @@ function handle404(app, middleware) {
|
||||
res.type('text/javascript').status(200).send('');
|
||||
} else if (isLanguage.test(req.url)) {
|
||||
res.status(200).json({});
|
||||
} else if (req.path.startsWith(relativePath + '/uploads') || req.get('accept').indexOf('text/html') === -1 || req.path === '/favicon.ico') {
|
||||
} else if (req.path.startsWith(relativePath + '/uploads') || (req.get('accept') && req.get('accept').indexOf('text/html') === -1) || req.path === '/favicon.ico') {
|
||||
res.sendStatus(404);
|
||||
} else if (req.accepts('html')) {
|
||||
if (process.env.NODE_ENV === 'development') {
|
||||
|
||||
Reference in New Issue
Block a user