diff --git a/app/config.js b/app/config.js index 7bd2a71..101bb08 100644 --- a/app/config.js +++ b/app/config.js @@ -26,7 +26,10 @@ module.exports = { demoSite: !!process.env.BTCEXP_DEMO, coin: currentCoin, - rpcBlacklist:[ + rpcBlacklist: + process.env.BTCEXP_RPC_ALLOWALL ? [] + : process.env.BTCEXP_RPC_BLACKLIST ? process.env.BTCEXP_RPC_BLACKLIST.split(',').filter(Boolean) + : [ "addnode", "backupwallet", "bumpfee", diff --git a/bin/cli.js b/bin/cli.js index 4522be3..62c64f7 100755 --- a/bin/cli.js +++ b/bin/cli.js @@ -16,6 +16,8 @@ const args = require('meow')(` -u, --bitcoind-user username for bitcoind rpc [default: none] -w, --bitcoind-pass password for bitcoind rpc [default: none] + --rpc-allowall allow all rpc commands [default: false] + --rpc-blacklist comma separated list of rpc commands to block [default: see in config.js] --cookie-secret secret key for signed cookie hmac generation [default: hmac derive from bitcoind pass] --demo enable demoSite mode [default: disabled] --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'} , bitcoindUri: {alias:'b'}, bitcoindHost: {alias:'H'}, bitcoindPort: {alias:'P'} , 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;