Add Web Key Directory (WKD)
This commit is contained in:
+11
-14
@@ -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;
|
||||
}
|
||||
}
|
||||
```
|
||||
Reference in New Issue
Block a user