Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

bagofholding

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bagofholding - npm Package Compare versions

Comparing version 0.1.5 to 0.1.6

5

CHANGELOG.md

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

### 0.1.5-pre
### 0.1.6-pre
* Add http#req no proxy hosts handling, localhost and 127.0.0 will ignore proxy by default
### 0.1.5
* Add http#req timeout handling, default timeout changed to 2000 milliseconds

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

19

lib/http.js
/*jshint esnext: true */
var request = require('request');
var request = require('request'),
_url = require('url');

@@ -14,2 +15,3 @@ /**

* - proxy: proxy server URL with format http://user:pass@host:port
* - noProxyHosts: an array of host names which will ignore any proxy settings, defaults to: localhost, 127.0.0.1
* - queryStrings: object containing URL query strings with format { name: value }

@@ -31,7 +33,14 @@ * - handlers: response handlers with format { statuscode: function(result, cb) }

function _proxyIgnored() {
const NO_PROXY_HOSTS = ['localhost', '127.0.0.1'];
return (opts.noProxyHosts || NO_PROXY_HOSTS).indexOf(_url.parse(url).hostname) !== -1;
}
// set proxy setting based on environment variable
if (opts.proxy) {
params.proxy = opts.proxy;
} else if (envProxy) {
params.proxy = envProxy;
if (!_proxyIgnored()) {
if (opts.proxy) {
params.proxy = opts.proxy;
} else if (envProxy) {
params.proxy = envProxy;
}
}

@@ -38,0 +47,0 @@

@@ -5,3 +5,3 @@ {

"keywords": [],
"version": "0.1.5",
"version": "0.1.6",
"homepage": "http://github.com/cliffano/bagofholding",

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

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