mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-13 21:50:33 +03:00
nixos/nginx: add option to change proxy timeouts
This commit is contained in:
parent
8aea69e5ab
commit
51166f90c6
1 changed files with 12 additions and 3 deletions
|
@ -154,9 +154,9 @@ let
|
||||||
|
|
||||||
${optionalString (cfg.recommendedProxySettings) ''
|
${optionalString (cfg.recommendedProxySettings) ''
|
||||||
proxy_redirect off;
|
proxy_redirect off;
|
||||||
proxy_connect_timeout 60;
|
proxy_connect_timeout ${cfg.proxyTimeout};
|
||||||
proxy_send_timeout 60;
|
proxy_send_timeout ${cfg.proxyTimeout};
|
||||||
proxy_read_timeout 60;
|
proxy_read_timeout ${cfg.proxyTimeout};
|
||||||
proxy_http_version 1.1;
|
proxy_http_version 1.1;
|
||||||
include ${recommendedProxyConfig};
|
include ${recommendedProxyConfig};
|
||||||
''}
|
''}
|
||||||
|
@ -401,6 +401,15 @@ in
|
||||||
";
|
";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
proxyTimeout = mkOption {
|
||||||
|
type = types.str;
|
||||||
|
default = "60s";
|
||||||
|
example = "20s";
|
||||||
|
description = "
|
||||||
|
Change the proxy related timeouts in recommendedProxySettings.
|
||||||
|
";
|
||||||
|
};
|
||||||
|
|
||||||
package = mkOption {
|
package = mkOption {
|
||||||
default = pkgs.nginxStable;
|
default = pkgs.nginxStable;
|
||||||
defaultText = "pkgs.nginxStable";
|
defaultText = "pkgs.nginxStable";
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue