From b2f717f5d607f91c17a3c4655479b8279212b089 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jose=CC=81=20F=2E=20Romaniello?= Date: Wed, 11 Jun 2014 14:08:35 -0300 Subject: [PATCH] do not log /test calls --- app.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app.js b/app.js index 1e4f404..07e0104 100644 --- a/app.js +++ b/app.js @@ -75,7 +75,7 @@ app.configure('production', function(){ app.configure(function(){ this.set("view engine", "jade"); - this.use(express.logger('dev')); + this.use('/test', function (req, res) { var ping_check = setTimeout(function () { winston.error('cant connect to the database (/test mongo ping timedout)'); @@ -96,6 +96,8 @@ app.configure(function(){ }); }); + this.use(express.logger('dev')); + this.use(function (req, res, next) { res.set({ 'Access-Control-Allow-Origin': (process.env.NODE_ENV === 'production' ? 'https' : 'http') + '://' + nconf.get('DOMAIN_URL_APP')