Merge pull request #133585 from mkg20001/fc-nginx-hash

This commit is contained in:
Maciej Krüger 2021-08-13 16:19:34 +02:00 committed by GitHub
commit 03ad23df49
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -171,6 +171,14 @@ let
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
map $http_upgrade $connection_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 processors 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 {
type = types.submodule {
options = {