mirror of
https://gitlab.com/keys.openpgp.org/hagrid.git
synced 2025-10-06 00:23:08 +02:00
nginx: route all requests via hagrid
This commit is contained in:
@@ -36,12 +36,12 @@ location /vks {
|
|||||||
limit_req zone=search_fpr_keyid burst=1000 nodelay;
|
limit_req zone=search_fpr_keyid burst=1000 nodelay;
|
||||||
|
|
||||||
error_page 404 /errors-static/404-by-fpr.htm;
|
error_page 404 /errors-static/404-by-fpr.htm;
|
||||||
default_type application/pgp-keys;
|
# default_type application/pgp-keys;
|
||||||
add_header Content-Disposition 'attachment; filename="$1$2$3.asc"';
|
# add_header Content-Disposition 'attachment; filename="$1$2$3.asc"';
|
||||||
add_header 'Access-Control-Allow-Origin' '*' always;
|
add_header 'Access-Control-Allow-Origin' '*' always;
|
||||||
add_header 'Cache-Control' 'no-cache' always;
|
add_header 'Cache-Control' 'no-cache' always;
|
||||||
etag off;
|
etag off;
|
||||||
try_files /keys/links/by-fpr/$1/$2/$3 =404;
|
proxy_pass http://127.0.0.1:8080;
|
||||||
}
|
}
|
||||||
|
|
||||||
location ~ ^/vks/v1/by-keyid/(?:0x)?([^/][^/])([^/][^/])(.*)$ {
|
location ~ ^/vks/v1/by-keyid/(?:0x)?([^/][^/])([^/][^/])(.*)$ {
|
||||||
@@ -49,12 +49,12 @@ location /vks {
|
|||||||
error_page 429 /errors-static/429-rate-limit-vks-fpr.htm;
|
error_page 429 /errors-static/429-rate-limit-vks-fpr.htm;
|
||||||
|
|
||||||
error_page 404 /errors-static/404-by-keyid.htm;
|
error_page 404 /errors-static/404-by-keyid.htm;
|
||||||
default_type application/pgp-keys;
|
# default_type application/pgp-keys;
|
||||||
add_header Content-Disposition 'attachment; filename="$1$2$3.asc"';
|
# add_header Content-Disposition 'attachment; filename="$1$2$3.asc"';
|
||||||
add_header 'Access-Control-Allow-Origin' '*' always;
|
add_header 'Access-Control-Allow-Origin' '*' always;
|
||||||
add_header 'Cache-Control' 'no-cache' always;
|
add_header 'Cache-Control' 'no-cache' always;
|
||||||
etag off;
|
etag off;
|
||||||
try_files /keys/links/by-keyid/$1/$2/$3 =404;
|
proxy_pass http://127.0.0.1:8080;
|
||||||
}
|
}
|
||||||
|
|
||||||
location /vks/v1/by-email/ {
|
location /vks/v1/by-email/ {
|
||||||
@@ -110,12 +110,12 @@ location /.well-known/openpgpkey {
|
|||||||
error_page 429 /errors-static/429-rate-limit-vks-email.htm;
|
error_page 429 /errors-static/429-rate-limit-vks-email.htm;
|
||||||
|
|
||||||
error_page 404 /errors-static/404-wkd.htm;
|
error_page 404 /errors-static/404-wkd.htm;
|
||||||
default_type application/octet-stream;
|
# default_type application/octet-stream;
|
||||||
add_header Content-Disposition 'attachment; filename="$2$3$4.asc"';
|
# add_header Content-Disposition 'attachment; filename="$2$3$4.asc"';
|
||||||
add_header 'Access-Control-Allow-Origin' '*' always;
|
add_header 'Access-Control-Allow-Origin' '*' always;
|
||||||
add_header 'Cache-Control' 'no-cache' always;
|
add_header 'Cache-Control' 'no-cache' always;
|
||||||
etag off;
|
etag off;
|
||||||
try_files /keys/links/wkd/$1/$2/$3/$4 =404;
|
proxy_pass http://127.0.0.1:8080;
|
||||||
}
|
}
|
||||||
|
|
||||||
location ~ "^/.well-known/openpgpkey/([^/]+)/policy$" {
|
location ~ "^/.well-known/openpgpkey/([^/]+)/policy$" {
|
||||||
|
Reference in New Issue
Block a user