From 511410789be5ef0baa441b1a684b3dff63d33704 Mon Sep 17 00:00:00 2001 From: Robin Gloster Date: Wed, 27 Jul 2016 13:47:31 +0000 Subject: [PATCH] nginx module: make client_max_body_size configurable --- nixos/modules/services/web-servers/nginx/default.nix | 10 ++++++++-- 1 file 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 {