parent
13ea83b10d
commit
7b5eb8968c
27
nginx.conf
27
nginx.conf
|
@ -17,7 +17,7 @@ http {
|
|||
root dist/public;
|
||||
|
||||
location /by-email/ {
|
||||
rewrite ^/by-email/([^/][^/])(..*)$ /by-email/$1/$2 break;
|
||||
rewrite "^/by-email/([^/]{2})([^/]*)$" /by-email/$1/$2 break;
|
||||
default_type application/pgp-keys;
|
||||
try_files /$uri =404;
|
||||
}
|
||||
|
@ -34,6 +34,31 @@ http {
|
|||
try_files /$uri =404;
|
||||
}
|
||||
|
||||
# Common HKP requests.
|
||||
location /pks/lookup {
|
||||
# sq keyserver get <KEYID>, gpg --receive-keys <KEYID>
|
||||
if ($args ~* "^op=get&options=mr&search=0x([A-F0-9]{2})([A-F0-9]{14})$") {
|
||||
set $dir $1;
|
||||
set $file $2;
|
||||
rewrite . /by-keyid/$dir/$file;
|
||||
}
|
||||
|
||||
# gpg --receive-keys <FINGERPRINT>
|
||||
if ($args ~* "^op=get&options=mr&search=0x([A-F0-9]{2})([A-F0-9]{38})$") {
|
||||
set $dir $1;
|
||||
set $file $2;
|
||||
rewrite . /by-fingerprint/$dir/$file;
|
||||
}
|
||||
|
||||
# gpg --locate-key <EMAIL>
|
||||
if ($args ~* "^op=get&options=mr&search=(..)([^&]*)@([^&]*)") {
|
||||
set $dir $1;
|
||||
set $local $2;
|
||||
set $horst $3;
|
||||
rewrite . /by-email/$dir/$local%40$horst;
|
||||
}
|
||||
}
|
||||
|
||||
location = / {
|
||||
proxy_pass http://127.0.0.1:8080;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue