Fixed misleading documentation

options.xfwd definitely works fine without using the .listen method, and, AFAICT, .toProxy should as well.  Only .ssl and .ws are referenced in .listen.
This commit is contained in:
Jimb Esser 2014-09-25 20:54:46 -07:00
parent e7d50b1a37
commit a4ca578b44

View File

@ -315,13 +315,13 @@ proxyServer.listen(8015);
* **forward**: url string to be parsed with the url module * **forward**: url string to be parsed with the url module
* **agent**: object to be passed to http(s).request (see Node's [https agent](http://nodejs.org/api/https.html#https_class_https_agent) and [http agent](http://nodejs.org/api/http.html#http_class_http_agent) objects) * **agent**: object to be passed to http(s).request (see Node's [https agent](http://nodejs.org/api/https.html#https_class_https_agent) and [http agent](http://nodejs.org/api/http.html#http_class_http_agent) objects)
* **secure**: true/false, if you want to verify the SSL Certs * **secure**: true/false, if you want to verify the SSL Certs
* **xfwd**: true/false, adds x-forward headers
* **toProxy**: passes the absolute URL as the `path` (useful for proxying to proxies)
If you are using the `proxyServer.listen` method, the following options are also applicable: If you are using the `proxyServer.listen` method, the following options are also applicable:
* **ssl**: object to be passed to https.createServer() * **ssl**: object to be passed to https.createServer()
* **ws**: true/false, if you want to proxy websockets * **ws**: true/false, if you want to proxy websockets
* **xfwd**: true/false, adds x-forward headers
* **toProxy**: passes the absolute URL as the `path` (useful for proxying to proxies)
### Shutdown ### Shutdown