Move wkd nginx configuration to a separate template
This commit is contained in:
parent
4e6aa8f0d2
commit
06d210fdc3
2 changed files with 15 additions and 14 deletions
15
conf/nginx-openpgpkey.conf
Normal file
15
conf/nginx-openpgpkey.conf
Normal file
|
@ -0,0 +1,15 @@
|
|||
# ADDITIONAL DIRECTIVES HERE
|
||||
|
||||
# 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;
|
||||
}
|
|
@ -98,17 +98,3 @@
|
|||
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