Skip to content

Commit ecbba1a

Browse files
committed
Merge pull request #852 from jpatters/patch-1
Added missing configuration options
2 parents 7605103 + fe3dd83 commit ecbba1a

File tree

1 file changed

+19
-6
lines changed

1 file changed

+19
-6
lines changed

README.md

+19-6
Original file line numberDiff line numberDiff line change
@@ -339,12 +339,25 @@ proxyServer.listen(8015);
339339
`httpProxy.createProxyServer` supports the following options:
340340

341341
* **target**: url string to be parsed with the url module
342-
* **forward**: url string to be parsed with the url module
343-
* **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)
344-
* **secure**: true/false, if you want to verify the SSL Certs
345-
* **xfwd**: true/false, adds x-forward headers
346-
* **toProxy**: passes the absolute URL as the `path` (useful for proxying to proxies)
347-
* **hostRewrite**: rewrites the location hostname on (301/302/307/308) redirects.
342+
* **forward**: url string to be parsed with the url module
343+
* **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)
344+
* **ssl**: object to be passed to https.createServer()
345+
* **ws**: true/false, if you want to proxy websockets
346+
* **xfwd**: true/false, adds x-forward headers
347+
* **secure**: true/false, if you want to verify the SSL Certs
348+
* **toProxy**: passes the absolute URL as the `path` (useful for proxying to proxies)
349+
* **prependPath**: true/false, Default: true - specify whether you want to prepend the target's path to the proxy path
350+
* **ignorePath**: true/false, Default: false - specify whether you want to ignore the proxy path of the incoming request
351+
* **localAddress**: Local interface string to bind for outgoing connections
352+
* **changeOrigin**: true/false, Default: false - changes the origin of the host header to the target URL
353+
* **auth**: Basic authentication i.e. 'user:password' to compute an Authorization header.
354+
* **hostRewrite**: rewrites the location hostname on (301/302/307/308) redirects.
355+
* **autoRewrite**: rewrites the location host/port on (301/302/307/308) redirects based on requested host/port. Default: false.
356+
* **protocolRewrite**: rewrites the location protocol on (301/302/307/308) redirects to 'http' or 'https'. Default: null.
357+
358+
**NOTE:**
359+
`options.ws` and `options.ssl` are optional.
360+
`options.target` and `options.forward` cannot both be missing
348361

349362
If you are using the `proxyServer.listen` method, the following options are also applicable:
350363

0 commit comments

Comments
 (0)