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} = {
|
virtualHosts.${cfg.nginx.domain} = {
|
||||||
# https://docs.pretalx.org/administrator/installation.html#step-7-ssl
|
# https://docs.pretalx.org/administrator/installation.html#step-7-ssl
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
more_set_headers Referrer-Policy same-origin;
|
more_set_headers "Referrer-Policy: same-origin";
|
||||||
more_set_headers X-Content-Type-Options nosniff;
|
more_set_headers "X-Content-Type-Options: nosniff";
|
||||||
'';
|
'';
|
||||||
locations = {
|
locations = {
|
||||||
"/".proxyPass = "http://pretalx";
|
"/".proxyPass = "http://pretalx";
|
||||||
"/media/" = {
|
"/media/" = {
|
||||||
alias = "${cfg.settings.filesystem.data}/data/media/";
|
alias = "${cfg.settings.filesystem.data}/media/";
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
access_log off;
|
access_log off;
|
||||||
more_set_headers Content-Disposition 'attachment; filename="$1"';
|
more_set_headers 'Content-Disposition: attachment; filename="$1"';
|
||||||
expires 7d;
|
expires 7d;
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue
Block a user