http-proxy
Advanced tools
Comparing version
@@ -40,2 +40,7 @@ /* | ||
// | ||
// Track our own list of agents internal to `node-http-proxy` | ||
// | ||
var _agents = {}; | ||
// | ||
// ### function _getAgent (host, port, secure) | ||
@@ -49,9 +54,19 @@ // #### @host {string} Host of the agent to get | ||
function _getAgent (host, port, secure) { | ||
var agent = !secure ? http.getAgent(host, port) : https.getAgent({ | ||
host: host, | ||
port: port | ||
}); | ||
agent.maxSockets = maxSockets; | ||
return agent; | ||
var Agent, id = [host, port].join(':'); | ||
if (!port) { | ||
port = secure ? 443 : 80; | ||
} | ||
if (!_agents[id]) { | ||
Agent = secure ? https.Agent : http.Agent; | ||
_agents[id] = new Agent({ | ||
host: host, | ||
port: port, | ||
maxSockets: maxSockets | ||
}); | ||
} | ||
return _agents[id]; | ||
} | ||
@@ -58,0 +73,0 @@ |
{ | ||
"name": "http-proxy", | ||
"description": "A full-featured http reverse proxy for node.js", | ||
"version": "0.5.9", | ||
"version": "0.5.10", | ||
"author": "Charlie Robbins <charlie.robbins@gmail.com>", | ||
@@ -6,0 +6,0 @@ "contributors": [ |
@@ -1,2 +0,2 @@ | ||
# node-http-proxy - v0.5.7 | ||
# node-http-proxy - v0.5.9 | ||
@@ -3,0 +3,0 @@ <img src="http://i.imgur.com/8fTt9.png" /> |
@@ -71,4 +71,4 @@ /* | ||
// | ||
var ws = new websocket.WebSocket(wsprotocol + '://home.devjitsu.com:8131/socket.io/websocket/', 'borf', { | ||
origin: protocol + '://home.devjitsu.com' | ||
var ws = new websocket.WebSocket(wsprotocol + '://localhost:8131/socket.io/websocket/', 'borf', { | ||
origin: protocol + '://localhost' | ||
}); | ||
@@ -112,4 +112,4 @@ | ||
// | ||
var ws = new websocket.WebSocket(wsprotocol + '://home.devjitsu.com:8133/socket.io/websocket/', 'borf', { | ||
origin: protocol + '://home.devjitsu.com' | ||
var ws = new websocket.WebSocket(wsprotocol + '://localhost:8133/socket.io/websocket/', 'borf', { | ||
origin: protocol + '://localhost' | ||
}); | ||
@@ -116,0 +116,0 @@ |
Sorry, the diff of this file is not supported yet
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
274202
5.95%39
18.18%2717
10.94%