This commit is contained in:
José F. Romaniello 2014-06-11 14:08:35 -03:00
Родитель a4e486ca08
Коммит b2f717f5d6
1 изменённых файлов: 3 добавлений и 1 удалений

4
app.js
Просмотреть файл

@ -75,7 +75,7 @@ app.configure('production', function(){
app.configure(function(){ app.configure(function(){
this.set("view engine", "jade"); this.set("view engine", "jade");
this.use(express.logger('dev'));
this.use('/test', function (req, res) { this.use('/test', function (req, res) {
var ping_check = setTimeout(function () { var ping_check = setTimeout(function () {
winston.error('cant connect to the database (/test mongo ping timedout)'); 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) { this.use(function (req, res, next) {
res.set({ res.set({
'Access-Control-Allow-Origin': (process.env.NODE_ENV === 'production' ? 'https' : 'http') + '://' + nconf.get('DOMAIN_URL_APP') 'Access-Control-Allow-Origin': (process.env.NODE_ENV === 'production' ? 'https' : 'http') + '://' + nconf.get('DOMAIN_URL_APP')