mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-13 09:13:17 +00:00
nixos/pretalx: fix /media/ nginx location block
Fix the alias for displaying media. Also the more_set_headers for Content-Disposition was invalid and broke browsers. While I was at it, I also quoted the other more_set_headers directives.
This commit is contained in:
parent
4b302c132d
commit
8f86f82b1a
@ -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;
|
||||
'';
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user