Skip to content

Commit b17f008

Browse files
authored
Merge pull request #130 from ichasepucks/master
Add --change-origin option as a passthrough to node-http-proxy's chan…
2 parents 5d7f58b + c953bc7 commit b17f008

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

bin/configurable-http-proxy

+5
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ args
5959
.option("--no-prepend-path", "Avoid prepending target paths to proxied requests")
6060
.option("--no-include-prefix", "Don't include the routing prefix in proxied requests")
6161
.option("--auto-rewrite", "Rewrite the Location header host/port in redirect responses")
62+
.option("--change-origin", "Changes the origin of the host header to the target URL")
6263
.option(
6364
"--protocol-rewrite <proto>",
6465
"Rewrite the Location header protocol in redirect responses to the specified protocol"
@@ -214,6 +215,10 @@ if (args.autoRewrite) {
214215
options.autoRewrite = true;
215216
log.info("AutoRewrite of Location headers enabled.");
216217
}
218+
if (args.changeOrigin) {
219+
options.changeOrigin = true;
220+
log.info("Change Origin of host headers enabled.");
221+
}
217222

218223
if (args.protocolRewrite) {
219224
options.protocolRewrite = args.protocolRewrite;

0 commit comments

Comments
 (0)