about summary refs log tree commit diff
path: root/nixos/modules/services/web-apps/peertube.nix
diff options
context:
space:
mode:
authorIzorkin <izorkin@elven.pw>2022-10-31 00:26:40 +0300
committerIzorkin <izorkin@elven.pw>2022-10-31 01:44:12 +0300
commit15959cdc5f52889585b85abc16c23c17f3d2c73f (patch)
treeed264241d8f22a05d39bc1f929a83a8978b3e6f7 /nixos/modules/services/web-apps/peertube.nix
parentd4296648b504b77760025eae2daf1342f1f5bdc9 (diff)
downloadnixlib-15959cdc5f52889585b85abc16c23c17f3d2c73f.tar
nixlib-15959cdc5f52889585b85abc16c23c17f3d2c73f.tar.gz
nixlib-15959cdc5f52889585b85abc16c23c17f3d2c73f.tar.bz2
nixlib-15959cdc5f52889585b85abc16c23c17f3d2c73f.tar.lz
nixlib-15959cdc5f52889585b85abc16c23c17f3d2c73f.tar.xz
nixlib-15959cdc5f52889585b85abc16c23c17f3d2c73f.tar.zst
nixlib-15959cdc5f52889585b85abc16c23c17f3d2c73f.zip
nixos/peertube: add quic header to nginx configuration
Diffstat (limited to 'nixos/modules/services/web-apps/peertube.nix')
-rw-r--r--nixos/modules/services/web-apps/peertube.nix8
1 files changed, 8 insertions, 0 deletions
diff --git a/nixos/modules/services/web-apps/peertube.nix b/nixos/modules/services/web-apps/peertube.nix
index 95dce42eba0e..aea25af358b8 100644
--- a/nixos/modules/services/web-apps/peertube.nix
+++ b/nixos/modules/services/web-apps/peertube.nix
@@ -69,6 +69,8 @@ let
 
   nginxCommonHeaders = lib.optionalString cfg.enableWebHttps ''
     add_header Strict-Transport-Security      'max-age=63072000; includeSubDomains';
+  '' + lib.optionalString config.services.nginx.virtualHosts.${cfg.localDomain}.http3 ''
+    add_header Alt-Svc                        'h3=":443"; ma=86400';
   '' + ''
     add_header Access-Control-Allow-Origin    '*';
     add_header Access-Control-Allow-Methods   'GET, OPTIONS';
@@ -491,6 +493,8 @@ in {
             add_header X-File-Maximum-Size              8G always;
           '' + lib.optionalString cfg.enableWebHttps ''
             add_header Strict-Transport-Security        'max-age=63072000; includeSubDomains';
+          '' + lib.optionalString config.services.nginx.virtualHosts.${cfg.localDomain}.http3 ''
+            add_header Alt-Svc                          'h3=":443"; ma=86400';
           '';
         };
 
@@ -503,6 +507,8 @@ in {
             add_header X-File-Maximum-Size              4M always;
           '' + lib.optionalString cfg.enableWebHttps ''
             add_header Strict-Transport-Security        'max-age=63072000; includeSubDomains';
+          '' + lib.optionalString config.services.nginx.virtualHosts.${cfg.localDomain}.http3 ''
+            add_header Alt-Svc                          'h3=":443"; ma=86400';
           '';
         };
 
@@ -568,6 +574,8 @@ in {
             add_header Cache-Control                    'public, max-age=604800, immutable';
           '' + lib.optionalString cfg.enableWebHttps ''
             add_header Strict-Transport-Security        'max-age=63072000; includeSubDomains';
+          '' + lib.optionalString config.services.nginx.virtualHosts.${cfg.localDomain}.http3 ''
+            add_header Alt-Svc                          'h3=":443"; ma=86400';
           '';
         };