http-proxy
Advanced tools
Comparing version 0.8.3 to 0.8.4
@@ -49,3 +49,4 @@ /* | ||
target: { | ||
https: true | ||
https: true, | ||
rejectUnauthorized: false | ||
} | ||
@@ -52,0 +53,0 @@ }).listen(8080); |
@@ -355,9 +355,4 @@ /* | ||
agent = new Agent({ | ||
host: options.host, | ||
port: options.port | ||
}); | ||
agent = new Agent(options); | ||
agent.maxSockets = options.maxSockets || maxSockets; | ||
return agent; | ||
@@ -396,2 +391,2 @@ } | ||
return result; | ||
}; | ||
}; |
@@ -440,2 +440,4 @@ /* | ||
self.emit('websocket:start', req, socket, head, this.target); | ||
// | ||
@@ -442,0 +444,0 @@ // Helper function for setting appropriate socket values: |
@@ -114,5 +114,13 @@ /* | ||
this.proxies[key].on('start', this.emit.bind(this, 'start')); | ||
this.proxies[key].on('forward', this.emit.bind(this, 'forward')); | ||
this.proxies[key].on('end', this.emit.bind(this, 'end')); | ||
[ | ||
'start', | ||
'forward', | ||
'end', | ||
'websocket:start', | ||
'websocket:end', | ||
'websocket:incoming', | ||
'websocket:outgoing' | ||
].forEach(function(event) { | ||
this.proxies[key].on(event, this.emit.bind(this, event)); | ||
}, this); | ||
}; | ||
@@ -119,0 +127,0 @@ |
{ | ||
"name": "http-proxy", | ||
"version": "0.8.3", | ||
"version": "0.8.4", | ||
"description": "A full-featured http reverse proxy for node.js", | ||
@@ -5,0 +5,0 @@ "author": "Nodejitsu Inc. <info@nodejitsu.com>", |
@@ -1,2 +0,2 @@ | ||
# node-http-proxy | ||
# node-http-proxy [![Build Status](https://secure.travis-ci.org/nodejitsu/node-http-proxy.png)](http://travis-ci.org/nodejitsu/node-http-proxy) | ||
@@ -481,2 +481,30 @@ <img src="http://i.imgur.com/8fTt9.png" /> | ||
## Options | ||
### Http Proxy | ||
`createServer()` supports the following options | ||
```javascript | ||
{ | ||
forward: { // options for forward-proxy | ||
port: 8000, | ||
host: 'staging.com' | ||
}, | ||
target : { // options for proxy target | ||
port : 8000, | ||
host : 'localhost', | ||
}; | ||
source : { // additional options for websocket proxying | ||
host : 'localhost', | ||
port : 8000, | ||
https: true | ||
}, | ||
enable : { | ||
xforward: true // enables X-Forwarded-For | ||
}, | ||
changeOrigin: false, // changes the origin of the host header to the target URL | ||
} | ||
``` | ||
## Run Tests | ||
@@ -483,0 +511,0 @@ The test suite is designed to fully cover the combinatoric possibilities of HTTP and HTTPS proxying: |
@@ -94,2 +94,3 @@ /* | ||
} | ||
options.proxy.rejectUnauthorized = false; | ||
@@ -96,0 +97,0 @@ return httpProxy |
@@ -30,2 +30,3 @@ /* | ||
// | ||
options.request.rejectUnauthorized = false; | ||
request(options.request, this.callback); | ||
@@ -324,2 +325,2 @@ }, | ||
return context; | ||
}; | ||
}; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Non-existent author
Supply chain riskThe package was published by an npm account that no longer exists.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
226870
557
57
81
5235
1