Browse Source

New configuration options: BTCEXP_RPC_ALLOWALL and BTCEXP_RPC_BLACKLIST

fix-133-memory-crash
Nadav Ivgi 6 years ago
parent
commit
769ab9f660
  1. 5
      app/config.js
  2. 5
      bin/cli.js

5
app/config.js

@ -26,7 +26,10 @@ module.exports = {
demoSite: !!process.env.BTCEXP_DEMO, demoSite: !!process.env.BTCEXP_DEMO,
coin: currentCoin, coin: currentCoin,
rpcBlacklist:[ rpcBlacklist:
process.env.BTCEXP_RPC_ALLOWALL ? []
: process.env.BTCEXP_RPC_BLACKLIST ? process.env.BTCEXP_RPC_BLACKLIST.split(',').filter(Boolean)
: [
"addnode", "addnode",
"backupwallet", "backupwallet",
"bumpfee", "bumpfee",

5
bin/cli.js

@ -16,6 +16,8 @@ const args = require('meow')(`
-u, --bitcoind-user <user> username for bitcoind rpc [default: none] -u, --bitcoind-user <user> username for bitcoind rpc [default: none]
-w, --bitcoind-pass <pass> password for bitcoind rpc [default: none] -w, --bitcoind-pass <pass> password for bitcoind rpc [default: none]
--rpc-allowall allow all rpc commands [default: false]
--rpc-blacklist <methods> comma separated list of rpc commands to block [default: see in config.js]
--cookie-secret <secret> secret key for signed cookie hmac generation [default: hmac derive from bitcoind pass] --cookie-secret <secret> secret key for signed cookie hmac generation [default: hmac derive from bitcoind pass]
--demo enable demoSite mode [default: disabled] --demo enable demoSite mode [default: disabled]
--no-rates disable fetching of currency exchange rates [default: enabled] --no-rates disable fetching of currency exchange rates [default: enabled]
@ -52,7 +54,8 @@ const args = require('meow')(`
`, { flags: { port: {alias:'p'}, login: {alias:'l'} `, { flags: { port: {alias:'p'}, login: {alias:'l'}
, bitcoindUri: {alias:'b'}, bitcoindHost: {alias:'H'}, bitcoindPort: {alias:'P'} , bitcoindUri: {alias:'b'}, bitcoindHost: {alias:'H'}, bitcoindPort: {alias:'P'}
, bitcoindCookie: {alias:'c'}, bitcoindUser: {alias:'u'}, bitcoindPass: {alias:'w'} , bitcoindCookie: {alias:'c'}, bitcoindUser: {alias:'u'}, bitcoindPass: {alias:'w'}
, demo: {type:'boolean'}, enableInfluxdb: {type:'boolean'}, nodeEnv: {alias:'e', default:'production'} , demo: {type:'boolean'}, rpcAllowall: {type:'boolean'}
, enableInfluxdb: {type:'boolean'}, nodeEnv: {alias:'e', default:'production'}
} } } }
).flags; ).flags;

Loading…
Cancel
Save