Merge pull request #260 from cubedro/develop

Added secret split by | char
This commit is contained in:
Marian OANCΞA 2015-08-17 17:07:45 +03:00
commit 5f3dffcc1f

7
app.js
View File

@ -10,9 +10,16 @@ if( !_.isUndefined(process.env.WS_SECRET) && !_.isNull(process.env.WS_SECRET) )
WS_SECRET = ["eth-net-stats-has-a-secret"]; WS_SECRET = ["eth-net-stats-has-a-secret"];
} }
else else
{
if( process.env.WS_SECRET.indexOf('|') > 0 )
{
WS_SECRET = process.env.WS_SECRET.split('|');
}
else
{ {
WS_SECRET = [process.env.WS_SECRET]; WS_SECRET = [process.env.WS_SECRET];
} }
}
var banned = require('./lib/utils/config').banned; var banned = require('./lib/utils/config').banned;