Merge pull request #295261 from SuperSandro2000/pretalx-media

nixos/pretalx: fix /media/ nginx location block
This commit is contained in:
Sandro 2024-04-21 22:45:17 +02:00 committed by GitHub
commit 9edb990e0e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 4 deletions

View File

@ -286,16 +286,16 @@ in
virtualHosts.${cfg.nginx.domain} = {
# https://docs.pretalx.org/administrator/installation.html#step-7-ssl
extraConfig = ''
more_set_headers Referrer-Policy same-origin;
more_set_headers X-Content-Type-Options nosniff;
more_set_headers "Referrer-Policy: same-origin";
more_set_headers "X-Content-Type-Options: nosniff";
'';
locations = {
"/".proxyPass = "http://pretalx";
"/media/" = {
alias = "${cfg.settings.filesystem.data}/data/media/";
alias = "${cfg.settings.filesystem.data}/media/";
extraConfig = ''
access_log off;
more_set_headers Content-Disposition 'attachment; filename="$1"';
more_set_headers 'Content-Disposition: attachment; filename="$1"';
expires 7d;
'';
};