Node.js based forum software built for the modern web
misrouting now only shows warning when in debug mode
Julian Lam57465eb2775c
diff --git a/src/webserver.js b/src/webserver.jsindex e1d3bfa591..0759ae3e37 100644--- a/src/webserver.js+++ b/src/webserver.js@@ -139,10 +139,11 @@ var express = require('express'),res.type('text/javascript').send(200, '');} else if (req.accepts('html')) {// respond with html page- winston.warn('Route requested but not found: ' + req.url);+ if (process.env.NODE_ENV === 'development') winston.warn('Route requested but not found: ' + req.url);res.redirect(nconf.get('relative_path') + '/404');} else if (req.accepts('json')) {// respond with json+ if (process.env.NODE_ENV === 'development') winston.warn('Route requested but not found: ' + req.url);res.json({error: 'Not found'});