mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-14 14:10:33 +03:00
nixos/peertube: add quic header to nginx configuration
This commit is contained in:
parent
d4296648b5
commit
15959cdc5f
1 changed files with 8 additions and 0 deletions
|
@ -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';
|
||||
'';
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue