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')