nginx: add vhost.http3

Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
This commit is contained in:
Maciej Krüger
2021-04-18 20:20:24 +02:00
co-authored by Sandro
parent 4a3bb18683
commit 9530794548
2 changed files with 22 additions and 1 deletions
@@ -249,7 +249,15 @@ let
+ optionalString (ssl && vhost.http2) "http2 "
+ optionalString vhost.default "default_server "
+ optionalString (extraParameters != []) (concatStringsSep " " extraParameters)
+ ";";
+ ";"
+ (if ssl && vhost.http3 then ''
# UDP listener for **QUIC+HTTP/3
listen ${addr}:${toString port} http3 reuseport;
# Advertise that HTTP/3 is available
add_header Alt-Svc 'h3=":443"';
# Sent when QUIC was used
add_header QUIC-Status $quic;
'' else "");
redirectListen = filter (x: !x.ssl) defaultListen;