Merge pull request #118521 from SuperSandro2000/nginx-proxy-timeout

nixos/nginx: add option to change proxy timeouts
This commit is contained in:
Sandro 2021-05-17 03:15:54 +02:00 committed by GitHub
commit ec1dd62608
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -154,9 +154,9 @@ let
${optionalString (cfg.recommendedProxySettings) ''
proxy_redirect off;
proxy_connect_timeout 60;
proxy_send_timeout 60;
proxy_read_timeout 60;
proxy_connect_timeout ${cfg.proxyTimeout};
proxy_send_timeout ${cfg.proxyTimeout};
proxy_read_timeout ${cfg.proxyTimeout};
proxy_http_version 1.1;
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 {
default = pkgs.nginxStable;
defaultText = "pkgs.nginxStable";