3
0
Fork 0
forked from mirrors/nixpkgs

nginx: add map_hash_*_size options

This commit is contained in:
Michael Fellinger 2019-10-09 13:03:06 +02:00
parent f251c29484
commit 2d0b34aa1c
No known key found for this signature in database
GPG key ID: F4D029589C005F89

View file

@ -119,6 +119,14 @@ let
include ${recommendedProxyConfig};
''}
${optionalString (cfg.mapHashBucketSize != null) ''
map_hash_bucket_size ${toString cfg.mapHashBucketSize};
''}
${optionalString (cfg.mapHashMaxSize != null) ''
map_hash_max_size ${toString cfg.mapHashMaxSize};
''}
# $connection_upgrade is used for websocket proxying
map $http_upgrade $connection_upgrade {
default upgrade;
@ -507,6 +515,23 @@ in
'';
};
mapHashBucketSize = mkOption {
type = types.nullOr (types.enum [ 32 64 128 ]);
default = null;
description = ''
Sets the bucket size for the map variables hash tables. Default
value depends on the processors cache line size.
'';
};
mapHashMaxSize = mkOption {
type = types.nullOr types.ints.positive;
default = null;
description = ''
Sets the maximum size of the map variables hash tables.
'';
};
resolver = mkOption {
type = types.submodule {
options = {