nginx: discourage caching of key results, and remove etag header

This commit is contained in:
Vincent Breitmoser 2020-01-09 11:40:33 +01:00
parent fa6d34384e
commit 7fde285968
No known key found for this signature in database
GPG Key ID: 7BD18320DEADFA11
1 changed files with 5 additions and 0 deletions

View File

@ -30,6 +30,8 @@ location /vks/v1/request-verify {
}
location /vks/v1/ {
etag off;
location ~ ^/vks/v1/by-fingerprint/(?:0x)?([^/][^/])([^/][^/])(..*)$ {
limit_req zone=search_fpr_keyid burst=30;
@ -37,6 +39,7 @@ location /vks/v1/ {
default_type application/pgp-keys;
add_header Content-Disposition 'attachment; filename="$1$2$3.asc"';
add_header 'Access-Control-Allow-Origin' '*';
add_header 'Cache-Control' 'no-cache';
try_files /keys/links/by-fpr/$1/$2/$3 =404;
}
@ -48,6 +51,7 @@ location /vks/v1/ {
default_type application/pgp-keys;
add_header Content-Disposition 'attachment; filename="$1$2$3.asc"';
add_header 'Access-Control-Allow-Origin' '*';
add_header 'Cache-Control' 'no-cache';
try_files /keys/links/by-keyid/$1/$2/$3 =404;
}
@ -57,6 +61,7 @@ location /vks/v1/ {
set $args "";
add_header 'Access-Control-Allow-Origin' '*';
add_header 'Cache-Control' 'no-cache';
proxy_pass http://127.0.0.1:8080;
# we have some trouble with uri encoding here. just route through