0
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-07-13 21:50:33 +03:00

nixos/nginx: Support additional listen parameters (#56835)

This commit is contained in:
Janne Heß 2019-03-06 10:42:46 +01:00 committed by Danylo Hlynskyi
parent 6fb8b38afc
commit 3de5726e9b
2 changed files with 3 additions and 1 deletions

View file

@ -194,11 +194,12 @@ let
then filter (x: x.ssl) defaultListen
else defaultListen;
listenString = { addr, port, ssl, ... }:
listenString = { addr, port, ssl, extraParameters ? [], ... }:
"listen ${addr}:${toString port} "
+ optionalString ssl "ssl "
+ optionalString (ssl && vhost.http2) "http2 "
+ optionalString vhost.default "default_server "
+ optionalString (extraParameters != []) (concatStringsSep " " extraParameters)
+ ";";
redirectListen = filter (x: !x.ssl) defaultListen;