From b22190416684e8ed57aa380c89083985eb0d9a4b Mon Sep 17 00:00:00 2001
From: Patrick Spek
Date: Sat, 22 May 2021 10:06:01 +0200
Subject: Move some hidden stuff to the src dir
---
.docker/envvars.sh | 14 ----------
.docker/lighttpd.conf | 29 ---------------------
.../openpgpkey/hu/i4fxxwcfae1o4d7wnb5bop89yfx399yf | Bin 8306 -> 0 bytes
.well-known/openpgpkey/policy | 0
src/.docker/envvars.sh | 14 ++++++++++
src/.docker/lighttpd.conf | 29 +++++++++++++++++++++
.../openpgpkey/hu/i4fxxwcfae1o4d7wnb5bop89yfx399yf | Bin 0 -> 8306 bytes
src/.well-known/openpgpkey/policy | 0
8 files changed, 43 insertions(+), 43 deletions(-)
delete mode 100644 .docker/envvars.sh
delete mode 100644 .docker/lighttpd.conf
delete mode 100644 .well-known/openpgpkey/hu/i4fxxwcfae1o4d7wnb5bop89yfx399yf
delete mode 100644 .well-known/openpgpkey/policy
create mode 100644 src/.docker/envvars.sh
create mode 100644 src/.docker/lighttpd.conf
create mode 100644 src/.well-known/openpgpkey/hu/i4fxxwcfae1o4d7wnb5bop89yfx399yf
create mode 100644 src/.well-known/openpgpkey/policy
diff --git a/.docker/envvars.sh b/.docker/envvars.sh
deleted file mode 100644
index 71f47e1..0000000
--- a/.docker/envvars.sh
+++ /dev/null
@@ -1,14 +0,0 @@
-#! /usr/bin/env sh
-
-main()
-{
- mkvar intendedHost "${INTENDED_HOST:-localhost}"
- mkvar intendedHostProto "${INTENDED_HOST_PROTO:-http}"
-}
-
-mkvar()
-{
- printf 'var.%s="%s"\n' "$1" "$2"
-}
-
-main "$@"
diff --git a/.docker/lighttpd.conf b/.docker/lighttpd.conf
deleted file mode 100644
index 1b480ca..0000000
--- a/.docker/lighttpd.conf
+++ /dev/null
@@ -1,29 +0,0 @@
-server.modules += (
- "mod_setenv",
- "mod_redirect",
-)
-
-setenv.add-response-header = (
- "Content-Security-Policy" => "default-src 'self'; img-src https:; object-src 'self'; script-src 'self'; style-src 'self'",
- "Referrer-Policy" => "no-referrer",
- "X-Content-Type-Options" => "nosniff",
- "X-Frame-Options" => "SAMEORIGIN",
- "X-Permitted-Cross-Domain-Policies" => "none",
- "X-XSS-Protection" => "1; mode=block",
-)
-
-include_shell "/usr/local/bin/lighttpd-env.sh"
-
-# Redirect to the "official" domain
-$HTTP["host"] != var.intendedHost {
- $HTTP["url"] !~ "^/.well-known" {
- 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" => "*",
- )
-}
diff --git a/.well-known/openpgpkey/hu/i4fxxwcfae1o4d7wnb5bop89yfx399yf b/.well-known/openpgpkey/hu/i4fxxwcfae1o4d7wnb5bop89yfx399yf
deleted file mode 100644
index 132dcdf..0000000
Binary files a/.well-known/openpgpkey/hu/i4fxxwcfae1o4d7wnb5bop89yfx399yf and /dev/null differ
diff --git a/.well-known/openpgpkey/policy b/.well-known/openpgpkey/policy
deleted file mode 100644
index e69de29..0000000
diff --git a/src/.docker/envvars.sh b/src/.docker/envvars.sh
new file mode 100644
index 0000000..71f47e1
--- /dev/null
+++ b/src/.docker/envvars.sh
@@ -0,0 +1,14 @@
+#! /usr/bin/env sh
+
+main()
+{
+ mkvar intendedHost "${INTENDED_HOST:-localhost}"
+ mkvar intendedHostProto "${INTENDED_HOST_PROTO:-http}"
+}
+
+mkvar()
+{
+ printf 'var.%s="%s"\n' "$1" "$2"
+}
+
+main "$@"
diff --git a/src/.docker/lighttpd.conf b/src/.docker/lighttpd.conf
new file mode 100644
index 0000000..1b480ca
--- /dev/null
+++ b/src/.docker/lighttpd.conf
@@ -0,0 +1,29 @@
+server.modules += (
+ "mod_setenv",
+ "mod_redirect",
+)
+
+setenv.add-response-header = (
+ "Content-Security-Policy" => "default-src 'self'; img-src https:; object-src 'self'; script-src 'self'; style-src 'self'",
+ "Referrer-Policy" => "no-referrer",
+ "X-Content-Type-Options" => "nosniff",
+ "X-Frame-Options" => "SAMEORIGIN",
+ "X-Permitted-Cross-Domain-Policies" => "none",
+ "X-XSS-Protection" => "1; mode=block",
+)
+
+include_shell "/usr/local/bin/lighttpd-env.sh"
+
+# Redirect to the "official" domain
+$HTTP["host"] != var.intendedHost {
+ $HTTP["url"] !~ "^/.well-known" {
+ 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" => "*",
+ )
+}
diff --git a/src/.well-known/openpgpkey/hu/i4fxxwcfae1o4d7wnb5bop89yfx399yf b/src/.well-known/openpgpkey/hu/i4fxxwcfae1o4d7wnb5bop89yfx399yf
new file mode 100644
index 0000000..132dcdf
Binary files /dev/null and b/src/.well-known/openpgpkey/hu/i4fxxwcfae1o4d7wnb5bop89yfx399yf differ
diff --git a/src/.well-known/openpgpkey/policy b/src/.well-known/openpgpkey/policy
new file mode 100644
index 0000000..e69de29
--
cgit v1.1