From 4c8e1d96a36523a548959415903bc669ebcc138d Mon Sep 17 00:00:00 2001 From: yawnt Date: Sun, 14 Oct 2012 19:36:02 +0200 Subject: [PATCH] [docs] options --- README.md | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/README.md b/README.md index 4390fb3c1..1cb4ba55e 100644 --- a/README.md +++ b/README.md @@ -478,6 +478,33 @@ 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 + +Http Proxy 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: