about summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorRobin Gloster <mail@glob.in>2016-07-27 13:47:31 +0000
committerRobin Gloster <mail@glob.in>2016-07-28 11:59:13 +0000
commit511410789be5ef0baa441b1a684b3dff63d33704 (patch)
tree3fc9e43b80960c6b4f858eefb3ef79197c02f76b /nixos
parent8c61b3af0398b1ec93d2abb2b80fa97099155b1c (diff)
downloadnixlib-511410789be5ef0baa441b1a684b3dff63d33704.tar
nixlib-511410789be5ef0baa441b1a684b3dff63d33704.tar.gz
nixlib-511410789be5ef0baa441b1a684b3dff63d33704.tar.bz2
nixlib-511410789be5ef0baa441b1a684b3dff63d33704.tar.lz
nixlib-511410789be5ef0baa441b1a684b3dff63d33704.tar.xz
nixlib-511410789be5ef0baa441b1a684b3dff63d33704.tar.zst
nixlib-511410789be5ef0baa441b1a684b3dff63d33704.zip
nginx module: make client_max_body_size configurable
Diffstat (limited to 'nixos')
-rw-r--r--nixos/modules/services/web-servers/nginx/default.nix10
1 files changed, 8 insertions, 2 deletions
diff --git a/nixos/modules/services/web-servers/nginx/default.nix b/nixos/modules/services/web-servers/nginx/default.nix
index d6b9836498d1..62737a289353 100644
--- a/nixos/modules/services/web-servers/nginx/default.nix
+++ b/nixos/modules/services/web-servers/nginx/default.nix
@@ -68,7 +68,7 @@ let
         proxy_http_version      1.0;
       ''}
 
-      client_max_body_size    10m;
+      client_max_body_size ${cfg.clientMaxBodySize};
 
       server_tokens ${if cfg.serverTokens then "on" else "off"};
 
@@ -270,7 +270,13 @@ in
       serverTokens = mkOption {
         type = types.bool;
         default = false;
-        description = "Show nginx version in headers and error pages";
+        description = "Show nginx version in headers and error pages.";
+      };
+
+      clientMaxBodySize = mkOption {
+        type = types.string;
+        default = "10m";
+        description = "Set nginx global client_max_body_size.";
       };
 
       sslCiphers = mkOption {