Skip to content

Commit 4c8e1d9

Browse files
committed
[docs] options
1 parent 2e7d8a8 commit 4c8e1d9

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

README.md

+27
Original file line numberDiff line numberDiff line change
@@ -478,6 +478,33 @@ options:
478478

479479
If you have a suggestion for a feature currently not supported, feel free to open a [support issue][6]. node-http-proxy is designed to just proxy http requests from one server to another, but we will be soon releasing many other complimentary projects that can be used in conjunction with node-http-proxy.
480480

481+
## Options
482+
483+
### Http Proxy
484+
485+
Http Proxy supports the following options
486+
487+
```javascript
488+
{
489+
forward: { // options for forward-proxy
490+
port: 8000,
491+
host: 'staging.com'
492+
target : { // options for proxy target
493+
port: 8000,
494+
host: 'localhost'
495+
}
496+
source : { // additional options for websocket proxying
497+
host : 'localhost',
498+
port : 8000,
499+
https: true
500+
}
501+
enable : {
502+
xforward: true // enables X-Forwarded-For
503+
}
504+
changeOrigin: false // changes the origin of the host header to the target URL
505+
}
506+
```
507+
481508
## Run Tests
482509
The test suite is designed to fully cover the combinatoric possibilities of HTTP and HTTPS proxying:
483510

0 commit comments

Comments
 (0)