Skip to content

documentation for options #315

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Oct 15, 2012
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -478,6 +478,34 @@ options:

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.

## 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
The test suite is designed to fully cover the combinatoric possibilities of HTTP and HTTPS proxying:

Expand Down