You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+19-6
Original file line number
Diff line number
Diff line change
@@ -339,12 +339,25 @@ proxyServer.listen(8015);
339
339
`httpProxy.createProxyServer` supports the following options:
340
340
341
341
***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
348
361
349
362
If you are using the `proxyServer.listen` method, the following options are also applicable:
0 commit comments