diff options
author | Patrick Spek <p.spek@tyil.nl> | 2019-10-22 13:19:44 +0200 |
---|---|---|
committer | Patrick Spek <p.spek@tyil.nl> | 2019-10-22 13:19:44 +0200 |
commit | e9a625ee803ce6572a936b1b30dfc72ebc183a94 (patch) | |
tree | d0d4779c61a5eee464e461b9888ac6a0003f1854 /.docker | |
parent | 271d616cb155460d3c364de0ace1fbc37419a3ec (diff) |
Add CORS header for WKP
Diffstat (limited to '.docker')
-rw-r--r-- | .docker/lighttpd.conf | 8 |
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" => "*", + ) +} |