Restrict listening host to configured `node_host
`
This commit is contained in:
parent
9090a191a8
commit
7fe09935cd
5
app.js
5
app.js
@ -26,5 +26,6 @@ _.extend(global.settings, env);
|
||||
|
||||
// kick off controller
|
||||
var app = require(global.settings.app_root + '/app/controllers/app');
|
||||
app.listen(global.settings.node_port);
|
||||
console.log("CartoDB SQL API listening on port " + global.settings.node_port);
|
||||
app.listen(global.settings.node_port, global.settings.node_host, function() {
|
||||
console.log("CartoDB SQL API listening on " + global.settings.node_host + ":" + global.settings.node_port);
|
||||
});
|
||||
|
@ -30,11 +30,13 @@ var app = require(global.settings.app_root + '/app/controllers/app');
|
||||
|
||||
var cluster = new Cluster({
|
||||
port: global.settings.node_port,
|
||||
host: global.settings.node_host,
|
||||
monHost: global.settings.node_host,
|
||||
monPort: global.settings.node_port+1
|
||||
});
|
||||
|
||||
cluster.listen(function(cb) {
|
||||
cb(app);
|
||||
}, function() {
|
||||
console.log("CartoDB SQL API listening on " + global.settings.node_host + ':' + global.settings.node_port);
|
||||
});
|
||||
|
||||
console.log("CartoDB SQL API listening on port " + global.settings.node_port);
|
||||
|
@ -1,4 +1,5 @@
|
||||
module.exports.node_port = 8080;
|
||||
module.exports.node_host = '127.0.0.1';
|
||||
module.exports.environment = 'development';
|
||||
module.exports.db_base_name = 'cartodb_dev_user_<%= user_id %>_db';
|
||||
module.exports.db_user = 'development_cartodb_user_<%= user_id %>';
|
||||
@ -9,4 +10,4 @@ module.exports.redis_port = 6379;
|
||||
module.exports.redisPool = 50;
|
||||
module.exports.redisIdleTimeoutMillis = 100;
|
||||
module.exports.redisReapIntervalMillis = 10;
|
||||
module.exports.redisLog = false;
|
||||
module.exports.redisLog = false;
|
||||
|
@ -9,7 +9,7 @@
|
||||
"email": "simon@vizzuality.com, strk@vizzuality.com"
|
||||
},
|
||||
"dependencies": {
|
||||
"cluster2": "git://github.com/CartoDB/cluster2.git#28cde11",
|
||||
"cluster2": "git://github.com/CartoDB/cluster2.git#cdb_production",
|
||||
"express": "~2.5.11",
|
||||
"underscore" : "1.1.x",
|
||||
"underscore.string": "1.1.5",
|
||||
|
Loading…
Reference in New Issue
Block a user