From e9a625ee803ce6572a936b1b30dfc72ebc183a94 Mon Sep 17 00:00:00 2001
From: Patrick Spek
Date: Tue, 22 Oct 2019 13:19:44 +0200
Subject: Add CORS header for WKP
---
.docker/lighttpd.conf | 8 ++++++++
1 file changed, 8 insertions(+)
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" => "*",
+ )
+}
--
cgit v1.1