Fix Content-Disposition headers for HKP served via nginx.

- Previously, the filename contained a '/'.
This commit is contained in:
Justus Winter
2019-03-01 13:28:21 +01:00
parent 53c086600a
commit df1f63bdc3

View File

@@ -33,14 +33,14 @@ location /pks/lookup {
if ($args ~ "^op=get&options=mr&?search=(0x)?([A-F0-9]{2})([A-F0-9]{14})$") { if ($args ~ "^op=get&options=mr&?search=(0x)?([A-F0-9]{2})([A-F0-9]{14})$") {
set $dir $2; set $dir $2;
set $file $3; set $file $3;
rewrite . /vks/by-keyid/$dir/$file; rewrite . /vks/by-keyid/$dir$file;
} }
# gpg --receive-keys <FINGERPRINT> # gpg --receive-keys <FINGERPRINT>
if ($args ~ "^op=get&options=mr&?search=(0x)?([A-F0-9]{2})([A-F0-9]{38})$") { if ($args ~ "^op=get&options=mr&?search=(0x)?([A-F0-9]{2})([A-F0-9]{38})$") {
set $dir $2; set $dir $2;
set $file $3; set $file $3;
rewrite . /vks/by-fingerprint/$dir/$file; rewrite . /vks/by-fingerprint/$dir$file;
} }
# gpg --locate-key <EMAIL> # gpg --locate-key <EMAIL>
@@ -48,7 +48,7 @@ location /pks/lookup {
set $dir $1; set $dir $1;
set $local $2; set $local $2;
set $horst $4; set $horst $4;
rewrite . /vks/by-email/$dir/$local%40$horst; rewrite . /vks/by-email/$dir$local%40$horst;
} }
proxy_pass http://127.0.0.1:8080; proxy_pass http://127.0.0.1:8080;