Merge pull request #32858 from nh2/nginx-add-http2-option
nginx service: Make http2 an option.
This commit is contained in:
commit
cf12bc44b6
@ -167,7 +167,8 @@ let
|
|||||||
|
|
||||||
listenString = { addr, port, ssl, ... }:
|
listenString = { addr, port, ssl, ... }:
|
||||||
"listen ${addr}:${toString port} "
|
"listen ${addr}:${toString port} "
|
||||||
+ optionalString ssl "ssl http2 "
|
+ optionalString ssl "ssl "
|
||||||
|
+ optionalString vhost.http2 "http2 "
|
||||||
+ optionalString vhost.default "default_server "
|
+ optionalString vhost.default "default_server "
|
||||||
+ ";";
|
+ ";";
|
||||||
|
|
||||||
|
@ -114,6 +114,20 @@ with lib;
|
|||||||
description = "Path to server SSL certificate key.";
|
description = "Path to server SSL certificate key.";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
http2 = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default = true;
|
||||||
|
description = ''
|
||||||
|
Whether to enable HTTP 2.
|
||||||
|
Note that (as of writing) due to nginx's implementation, to disable
|
||||||
|
HTTP 2 you have to disable it on all vhosts that use a given
|
||||||
|
IP address / port.
|
||||||
|
If there is one server block configured to enable http2,then it is
|
||||||
|
enabled for all server blocks on this IP.
|
||||||
|
See https://stackoverflow.com/a/39466948/263061.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
root = mkOption {
|
root = mkOption {
|
||||||
type = types.nullOr types.path;
|
type = types.nullOr types.path;
|
||||||
default = null;
|
default = null;
|
||||||
|
Loading…
Reference in New Issue
Block a user