Add public nginx endpoints for WKD
This commit is contained in:
parent
6a08551402
commit
9be5d2b454
1 changed files with 15 additions and 1 deletions
|
@ -1,5 +1,5 @@
|
|||
# ADDITIONAL DIRECTIVES HERE
|
||||
|
||||
|
||||
# Control Panel
|
||||
# Proxy /admin to our Python based control panel daemon. It is
|
||||
# listening on IPv4 only so use an IP address and not 'localhost'.
|
||||
|
@ -98,3 +98,17 @@
|
|||
rewrite ^/.well-known/host-meta.json /cloud/public.php?service=host-meta-json last;
|
||||
rewrite ^/.well-known/carddav /cloud/remote.php/carddav/ redirect;
|
||||
rewrite ^/.well-known/caldav /cloud/remote.php/caldav/ redirect;
|
||||
|
||||
# WKD Locations
|
||||
location ~ ^/.well-known/openpgpkey/(?<domain>.+)/policy$ {
|
||||
add_header Access-Control-Allow-origin * always;
|
||||
if (-d /var/lib/mailinabox/wkd/$domain/) {
|
||||
return 204;
|
||||
}
|
||||
return 404;
|
||||
}
|
||||
|
||||
location ~ ^/.well-known/openpgpkey/(?<domain>.+)/hu/(?<keyid>[ybndrfg8ejkmcpqxot1uwisza345h769]+)$ {
|
||||
add_header Access-Control-Allow-Origin * always;
|
||||
alias /var/lib/mailinabox/wkd/$domain/$keyid;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue