From 27cba8e4b054b6dde5b399e201d52b77b11a9a8a Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Tue, 20 Mar 2018 17:03:46 +0000 Subject: refactor config --- blockcypher.js | 17 ----------------- 1 file changed, 17 deletions(-) delete mode 100644 blockcypher.js (limited to 'blockcypher.js') diff --git a/blockcypher.js b/blockcypher.js deleted file mode 100644 index 91adbc10..00000000 --- a/blockcypher.js +++ /dev/null @@ -1,17 +0,0 @@ -const proxyMiddleware = require('http-proxy-middleware') -const proxyContext = '/blockcypher' - -const proxyOptions = { - target: 'https://api.blockcypher.com', - changeOrigin: true, - pathRewrite: { - '^/blockcypher/': '/' - }, - onProxyReq: function(proxyReq, req, res) { - var symbol - symbol = indexOf.call(proxyReq.path, '?') >= 0 ? '&' : '?' - return proxyReq.path += symbol + "token=" + config.blockcypher_token - } -} - -module.exports = proxyMiddleware(proxyContext, proxyOptions) -- cgit v1.2.3