diff options
| author | Adam Soltys <[email protected]> | 2018-03-20 17:03:46 +0000 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2018-03-20 17:03:46 +0000 |
| commit | 27cba8e4b054b6dde5b399e201d52b77b11a9a8a (patch) | |
| tree | 19e5c2ab5f636a43e7d1e315d328b1f7bfde1f35 /blockcypher.js | |
| parent | aca2da56939d6168bf8e02a9d112951abc3da927 (diff) | |
| download | coinos-server-27cba8e4b054b6dde5b399e201d52b77b11a9a8a.tar.gz coinos-server-27cba8e4b054b6dde5b399e201d52b77b11a9a8a.zip | |
refactor config
Diffstat (limited to 'blockcypher.js')
| -rw-r--r-- | blockcypher.js | 17 |
1 files changed, 0 insertions, 17 deletions
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) |
