mirror of
https://gitlab.com/hagrid-keyserver/hagrid.git
synced 2023-02-13 20:55:02 -05:00
Pass failing /by-* queries to hagrid for normalization.
This commit is contained in:
parent
7123c884bb
commit
6e84a51310
1 changed files with 9 additions and 4 deletions
13
nginx.conf
13
nginx.conf
|
@ -27,17 +27,22 @@ http {
|
|||
}
|
||||
|
||||
location /by-fingerprint/ {
|
||||
rewrite ^/by-fingerprint/(0x)?([^/][^/])(..*)$ $2/$3 break;
|
||||
rewrite ^/by-fingerprint/(0x)?([^/][^/])(..*)$ /by-fingerprint/$2$3 break;
|
||||
default_type application/pgp-keys;
|
||||
add_header Content-Disposition 'attachment; filename="$2$3.asc"';
|
||||
try_files /by-fpr/$uri =404;
|
||||
try_files /by-fpr/$2/$3 @fallback;
|
||||
}
|
||||
|
||||
location /by-keyid/ {
|
||||
rewrite ^/by-keyid/(0x)?([^/][^/])(.*)$ /by-keyid/$2/$3 break;
|
||||
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;
|
||||
try_files /by-keyid/$2/$3 @fallback;
|
||||
}
|
||||
|
||||
# Pass queries that we do not understand to hagrid.
|
||||
location @fallback {
|
||||
proxy_pass http://127.0.0.1:8080;
|
||||
}
|
||||
|
||||
# Common HKP requests.
|
||||
|
|
Loading…
Reference in a new issue