Skip to content

Commit fa26a15

Browse files
authored
Merge pull request #208 from archite/configure-request-timeout
Allow setting request timeout
2 parents a454895 + cf5478e commit fa26a15

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

bin/configurable-http-proxy

+6
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,11 @@ args
8787
.option("--statsd-port <port>", "Port to send statsd statistics to", parseInt)
8888
.option("--statsd-prefix <prefix>", "Prefix to use for statsd statistics")
8989
.option("--log-level <loglevel>", "Log level (debug, info, warn, error)", "info")
90+
.option(
91+
"--timeout <n>",
92+
"Timeout (in millis) when proxy drops connection for a request.",
93+
parseInt
94+
)
9095
.option(
9196
"--proxy-timeout <n>",
9297
"Timeout (in millis) when proxy receives no response from target.",
@@ -249,6 +254,7 @@ options.hostRouting = args.hostRouting;
249254
options.authToken = process.env.CONFIGPROXY_AUTH_TOKEN;
250255
options.redirectPort = args.redirectPort;
251256
options.redirectTo = args.redirectTo;
257+
options.timeout = args.timeout;
252258
options.proxyTimeout = args.proxyTimeout;
253259

254260
// statsd options

0 commit comments

Comments
 (0)