From 934897b153a0b650107b4da4a93ae9448a1f183a Mon Sep 17 00:00:00 2001 From: Adhidarma Hadiwinoto <me@adhisimon.org> Date: Thu, 17 Jan 2019 19:08:42 +0700 Subject: [PATCH] config.default_host_options --- index.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index 0314b9e..7fb453c 100644 --- a/index.js +++ b/index.js @@ -14,11 +14,12 @@ for (let i=0; i < hostsCount; i++) { let host = config.hosts[i] console.log(`Registering ${host.host} to ${host.target}`); if (!host.disable) { - if (!host.options) { + const options = host.options ? config.default_host_options; + if (!options) { redbird.register(host.host, host.target); } else { - redbird.register(host.host, host.target, host.options); + redbird.register(host.host, host.target, options); } } -- 1.9.0