mirror of
https://gitlab.com/hagrid-keyserver/hagrid.git
synced 2023-02-13 20:55:02 -05:00
Only handle machine-readable requests from nginx.
- And relay the rest to hagrid.
This commit is contained in:
parent
b5b521edca
commit
28681b3efb
1 changed files with 12 additions and 10 deletions
22
nginx.conf
22
nginx.conf
|
@ -37,26 +37,28 @@ http {
|
|||
# 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 $3;
|
||||
set $file $4;
|
||||
if ($args ~* "^op=get&options=mr&?search=(0x)?([A-F0-9]{2})([A-F0-9]{14})$") {
|
||||
set $dir $2;
|
||||
set $file $3;
|
||||
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 $3;
|
||||
set $file $4;
|
||||
if ($args ~* "^op=get&options=mr&?search=(0x)?([A-F0-9]{2})([A-F0-9]{38})$") {
|
||||
set $dir $2;
|
||||
set $file $3;
|
||||
rewrite . /by-fingerprint/$dir/$file;
|
||||
}
|
||||
|
||||
# gpg --locate-key <EMAIL>
|
||||
if ($args ~* "^op=get&(options=mr&)?search=(..)([^&]*)@([^&]*)") {
|
||||
set $dir $2;
|
||||
set $local $3;
|
||||
set $horst $4;
|
||||
if ($args ~* "^op=get&options=mr&?search=(..)([^&]*)@([^&]*)") {
|
||||
set $dir $1;
|
||||
set $local $2;
|
||||
set $horst $3;
|
||||
rewrite . /by-email/$dir/$local%40$horst;
|
||||
}
|
||||
|
||||
proxy_pass http://127.0.0.1:8080;
|
||||
}
|
||||
|
||||
location = / {
|
||||
|
|
Loading…
Reference in a new issue