Socket
Socket
Sign inDemoInstall

bagofrequest

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bagofrequest - npm Package Compare versions

Comparing version 0.1.3 to 0.1.4

5

CHANGELOG.md

@@ -1,2 +0,5 @@

### 0.1.3-pre
### 0.1.4
* Add noproxy environment variable support
### 0.1.3
* Set min node engine to v4.0.0

@@ -3,0 +6,0 @@

10

lib/bagofrequest.js

@@ -204,3 +204,11 @@ var request = require('request'),

const NO_PROXY_HOSTS = ['localhost', '127.0.0.1'];
return (opts.noProxyHosts || NO_PROXY_HOSTS).indexOf(_url.parse(url).hostname) !== -1;
var noProxyHosts = [];
if (process.env.no_proxy) {
noProxyHosts = noProxyHosts.concat(process.env.no_proxy.split(','));
}
if (process.env.NO_PROXY) {
noProxyHosts = noProxyHosts.concat(process.env.NO_PROXY.split(','));
}
noProxyHosts = noProxyHosts.concat(NO_PROXY_HOSTS);
return (opts.noProxyHosts || noProxyHosts).indexOf(_url.parse(url).hostname) !== -1;
}

@@ -207,0 +215,0 @@

@@ -8,3 +8,3 @@ {

],
"version": "0.1.3",
"version": "0.1.4",
"homepage": "http://github.com/cliffano/bagofrequest",

@@ -45,2 +45,2 @@ "author": "Cliffano Subagio <blah@cliffano.com> (http://blog.cliffano.com)",

]
}
}

@@ -14,3 +14,3 @@ <img align="right" src="https://raw.github.com/cliffano/bagofrequest/master/avatar.jpg" alt="Avatar"/>

bagofrequest#request
bagofrequest#request

@@ -38,2 +38,3 @@ Send http request using [mikeal/request](http://github.com/mikeal/request), with the following additional features:

* if URL is not provided, then set proxy to http_proxy or HTTP_PROXY, otherwise fallback to https_proxy or HTTPS_PROXY
* proxy will be ignored if host is on no_proxy or NO_PROXY when provided, otherwise ignore 127.0.0.1 and localhost

@@ -103,3 +104,3 @@ Installation

retry: {
errorCodes: true, // retry on any error
errorCodes: true, // retry on any error
statusCodes: [404, 503], // retry when response status code is 404 or 503

@@ -106,0 +107,0 @@ scale: 0.5, // increase delay by half on each retry

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc