Add Web Key Directory (WKD)

This commit is contained in:
2026-10-10 22:30:42 +03:00
parent 4bbcd31694
commit 9ef912049a
7 changed files with 120 additions and 167 deletions
+11 -14
View File
@@ -1,16 +1,12 @@
```nginx
server {
listen 80;
server_name _;
root /usr/share/nginx/html;
server_tokens off;
autoindex off;
add_header X-Content-Type-Options "nosniff" always;
add_header X-Frame-Options "DENY" always;
add_header Access-Control-Allow-Origin "*" always;
location = /healthz {
access_log off;
@@ -18,16 +14,18 @@ server {
return 200 "OK\n";
}
location /keys/ {
limit_except GET HEAD {
deny all;
}
types {
text/plain asc;
text/plain txt;
}
# Direct-method Web Key Directory (WKD).
# Files live under ./wkd, mounted at /.well-known/openpgpkey/.
location ^~ /.well-known/openpgpkey/ {
limit_except GET HEAD { deny all; }
default_type application/octet-stream;
add_header Access-Control-Allow-Origin "*" always;
try_files $uri =404;
}
# Optional legacy/static download URLs.
location ^~ /keys/ {
limit_except GET HEAD { deny all; }
default_type application/octet-stream;
try_files $uri =404;
}
@@ -36,4 +34,3 @@ server {
return 404;
}
}
```