Skip to content

Allow setting request timeout #208

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 1 commit into from
Nov 12, 2019
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
6 changes: 6 additions & 0 deletions bin/configurable-http-proxy
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,11 @@ args
.option("--statsd-port <port>", "Port to send statsd statistics to", parseInt)
.option("--statsd-prefix <prefix>", "Prefix to use for statsd statistics")
.option("--log-level <loglevel>", "Log level (debug, info, warn, error)", "info")
.option(
"--timeout <n>",
"Timeout (in millis) when proxy drops connection for a request.",
parseInt
)
.option(
"--proxy-timeout <n>",
"Timeout (in millis) when proxy receives no response from target.",
Expand Down Expand Up @@ -249,6 +254,7 @@ options.hostRouting = args.hostRouting;
options.authToken = process.env.CONFIGPROXY_AUTH_TOKEN;
options.redirectPort = args.redirectPort;
options.redirectTo = args.redirectTo;
options.timeout = args.timeout;
options.proxyTimeout = args.proxyTimeout;

// statsd options
Expand Down