diff options
author | Sandro <sandro.jaeckel@gmail.com> | 2021-05-17 03:15:54 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-17 03:15:54 +0200 |
commit | ec1dd62608bef2df56b0189d1eec4a0029834fd4 (patch) | |
tree | d113ca9907c983054c7f671c59e7b427eae232e6 /nixos | |
parent | fd899bd0804be2473fc29a436e5464b13b4004b4 (diff) | |
parent | 51166f90c694785975c2b0f48a20dd35663bb1fa (diff) | |
download | nixpkgs-ec1dd62608bef2df56b0189d1eec4a0029834fd4.tar nixpkgs-ec1dd62608bef2df56b0189d1eec4a0029834fd4.tar.gz nixpkgs-ec1dd62608bef2df56b0189d1eec4a0029834fd4.tar.bz2 nixpkgs-ec1dd62608bef2df56b0189d1eec4a0029834fd4.tar.lz nixpkgs-ec1dd62608bef2df56b0189d1eec4a0029834fd4.tar.xz nixpkgs-ec1dd62608bef2df56b0189d1eec4a0029834fd4.tar.zst nixpkgs-ec1dd62608bef2df56b0189d1eec4a0029834fd4.zip |
Merge pull request #118521 from SuperSandro2000/nginx-proxy-timeout
nixos/nginx: add option to change proxy timeouts
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/modules/services/web-servers/nginx/default.nix | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/nixos/modules/services/web-servers/nginx/default.nix b/nixos/modules/services/web-servers/nginx/default.nix index d811879b7b1..1a078ea6bd5 100644 --- a/nixos/modules/services/web-servers/nginx/default.nix +++ b/nixos/modules/services/web-servers/nginx/default.nix @@ -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"; |