Skip to content

Commit 7d86b3e

Browse files
committed
docs(http-proxy options): update http-proxy options
1 parent 9a5cf83 commit 7d86b3e

File tree

1 file changed

+17
-3
lines changed

1 file changed

+17
-3
lines changed

README.md

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -304,15 +304,29 @@ The following options are provided by the underlying [http-proxy](https://github
304304
* **option.xfwd**: true/false, adds x-forward headers
305305
* **option.secure**: true/false, if you want to verify the SSL Certs
306306
* **option.toProxy**: true/false, passes the absolute URL as the `path` (useful for proxying to proxies)
307-
* **option.prependPath**: true/false, Default: true - specify whether you want to prepend the target's path to the proxy path>
308-
* **option.ignorePath**: true/false, Default: false - specify whether you want to ignore the proxy path of the incoming request>
307+
* **option.prependPath**: true/false, Default: true - specify whether you want to prepend the target's path to the proxy path
308+
* **option.ignorePath**: true/false, Default: false - specify whether you want to ignore the proxy path of the incoming request (note: you will have to append / manually if required).
309309
* **option.localAddress** : Local interface string to bind for outgoing connections
310-
* **option.changeOrigin**: true/false, adds host to request header.
310+
* **option.changeOrigin**: true/false, Default: false - changes the origin of the host header to the target URL
311311
* **option.auth** : Basic authentication i.e. 'user:password' to compute an Authorization header.
312312
* **option.hostRewrite**: rewrites the location hostname on (301/302/307/308) redirects.
313313
* **option.autoRewrite**: rewrites the location host/port on (301/302/307/308) redirects based on requested host/port. Default: false.
314314
* **option.protocolRewrite**: rewrites the location protocol on (301/302/307/308) redirects to 'http' or 'https'. Default: null.
315+
* **option.cookieDomainRewrite**: rewrites domain of `set-cookie` headers. Possible values:
316+
* `false` (default): disable cookie rewriting
317+
* String: new domain, for example `cookieDomainRewrite: "new.domain"`. To remove the domain, use `cookieDomainRewrite: ""`.
318+
* Object: mapping of domains to new domains, use `"*"` to match all domains.
319+
For example keep one domain unchanged, rewrite one domain and remove other domains:
320+
```
321+
cookieDomainRewrite: {
322+
"unchanged.domain": "unchanged.domain",
323+
"old.domain": "new.domain",
324+
"*": ""
325+
}
326+
```
315327
* **option.headers**: object, adds [request headers](https://en.wikipedia.org/wiki/List_of_HTTP_header_fields#Request_fields). (Example: `{host:'www.example.org'}`)
328+
* **option.proxyTimeout**: timeout (in millis) when proxy receives no response from target
329+
316330
317331
318332
## Shorthand

0 commit comments

Comments
 (0)