Provide nicer filenames for downloads.
- This is especially useful for the HKP interface, where previously all downloads were named 'lookup'.
This commit is contained in:
parent
2aed7802db
commit
4c10cbdb2f
|
@ -19,18 +19,21 @@ http {
|
|||
location /by-email/ {
|
||||
rewrite "^/by-email/([^/]{2})([^/]*)$" /by-email/$1/$2 break;
|
||||
default_type application/pgp-keys;
|
||||
add_header Content-Disposition 'attachment; filename="$1$2.asc"';
|
||||
try_files /$uri =404;
|
||||
}
|
||||
|
||||
location /by-fingerprint/ {
|
||||
rewrite ^/by-fingerprint/(0x)?([^/][^/])(..*)$ $2/$3 break;
|
||||
default_type application/pgp-keys;
|
||||
add_header Content-Disposition 'attachment; filename="$2$3.asc"';
|
||||
try_files /by-fpr/$uri =404;
|
||||
}
|
||||
|
||||
location /by-keyid/ {
|
||||
rewrite ^/by-keyid/(0x)?([^/][^/])(.*)$ /by-keyid/$2/$3 break;
|
||||
default_type application/pgp-keys;
|
||||
add_header Content-Disposition 'attachment; filename="$2$3.asc"';
|
||||
try_files /$uri =404;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue