summaryrefslogtreecommitdiff
path: root/.docker
diff options
context:
space:
mode:
authorPatrick Spek <p.spek@tyil.nl>2019-10-22 13:19:44 +0200
committerPatrick Spek <p.spek@tyil.nl>2019-10-22 13:19:44 +0200
commite9a625ee803ce6572a936b1b30dfc72ebc183a94 (patch)
treed0d4779c61a5eee464e461b9888ac6a0003f1854 /.docker
parent271d616cb155460d3c364de0ace1fbc37419a3ec (diff)
Add CORS header for WKP
Diffstat (limited to '.docker')
-rw-r--r--.docker/lighttpd.conf8
1 files changed, 8 insertions, 0 deletions
diff --git a/.docker/lighttpd.conf b/.docker/lighttpd.conf
index c8f6f72..05ce81c 100644
--- a/.docker/lighttpd.conf
+++ b/.docker/lighttpd.conf
@@ -14,6 +14,14 @@ setenv.add-response-header = (
include_shell "/usr/local/bin/lighttpd-env.sh"
+# Redirect to the "official" domain
$HTTP["host"] != var.intendedHost {
url.redirect = ( "^/(.*)" => var.intendedHostProto + "://" + var.intendedHost + "/$1" )
}
+
+# Add CORS header for WKP
+$HTTP["url"] =~ "^/.well-known/openpgpkey" {
+ setenv.add-response-header = (
+ "Access-Control-Allow-Origin" => "*",
+ )
+}