Add public nginx endpoints for WKD

This commit is contained in:
David Duque 2020-12-20 23:11:28 +00:00
parent 6a08551402
commit 9be5d2b454
No known key found for this signature in database
GPG key ID: 2F327738A3C0AE3A

View file

@ -98,3 +98,17 @@
rewrite ^/.well-known/host-meta.json /cloud/public.php?service=host-meta-json last; 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/carddav /cloud/remote.php/carddav/ redirect;
rewrite ^/.well-known/caldav /cloud/remote.php/caldav/ 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;
}