nixos/nginx: make serverNamesHash{Bucket,Max}Size configurable
This commit is contained in:
parent
ddc18b7bbd
commit
934698a378
|
@ -171,6 +171,14 @@ let
|
||||||
map_hash_max_size ${toString cfg.mapHashMaxSize};
|
map_hash_max_size ${toString cfg.mapHashMaxSize};
|
||||||
''}
|
''}
|
||||||
|
|
||||||
|
${optionalString (cfg.serverNamesHashBucketSize != null) ''
|
||||||
|
server_names_hash_bucket_size ${toString cfg.serverNamesHashBucketSize};
|
||||||
|
''}
|
||||||
|
|
||||||
|
${optionalString (cfg.serverNamesHashMaxSize != null) ''
|
||||||
|
server_names_hash_max_size ${toString cfg.serverNamesHashMaxSize};
|
||||||
|
''}
|
||||||
|
|
||||||
# $connection_upgrade is used for websocket proxying
|
# $connection_upgrade is used for websocket proxying
|
||||||
map $http_upgrade $connection_upgrade {
|
map $http_upgrade $connection_upgrade {
|
||||||
default upgrade;
|
default upgrade;
|
||||||
|
@ -643,6 +651,23 @@ in
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
serverNamesHashBucketSize = mkOption {
|
||||||
|
type = types.nullOr types.ints.positive;
|
||||||
|
default = null;
|
||||||
|
description = ''
|
||||||
|
Sets the bucket size for the server names hash tables. Default
|
||||||
|
value depends on the processor’s cache line size.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
serverNamesHashMaxSize = mkOption {
|
||||||
|
type = types.nullOr types.ints.positive;
|
||||||
|
default = null;
|
||||||
|
description = ''
|
||||||
|
Sets the maximum size of the server names hash tables.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
resolver = mkOption {
|
resolver = mkOption {
|
||||||
type = types.submodule {
|
type = types.submodule {
|
||||||
options = {
|
options = {
|
||||||
|
|
Loading…
Reference in a new issue