From 4e80c7535fa9238b56ec1fb57f1fabd6f4e752d7 Mon Sep 17 00:00:00 2001 From: anima Date: Fri, 12 Jul 2024 21:22:37 +0200 Subject: [PATCH] add caddy config snippets --- README.md | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/README.md b/README.md index 6754ee1..e51f864 100644 --- a/README.md +++ b/README.md @@ -45,6 +45,46 @@ source .env docker exec -it matrix_app_1 register_new_matrix_user -u $USERNAME -p $USERPASS -a -c /data/homeserver.yaml $DOMAIN ``` + +### caddy config +#### synapse +``` +synapse.example.com { + reverse_proxy /_matrix/* $IPOFDOCKERHOST:8008 + reverse_proxy /_synapse/client/* $IPOFDOCKERHOST:8008 + + header { + X-Content-Type-Options nosniff + Referrer-Policy strict-origin-when-cross-origin + Strict-Transport-Security "max-age=63072000; includeSubDomains;" + Permissions-Policy "accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()" + X-Frame-Options SAMEORIGIN + X-XSS-Protection 1 + X-Robots-Tag none + -server + } +} +``` + +#### element +``` +element.example.com { + encode zstd gzip + reverse_proxy $IPOFDOCKERHOST:8080 + + header { + X-Content-Type-Options nosniff + Referrer-Policy strict-origin-when-cross-origin + Strict-Transport-Security "max-age=63072000; includeSubDomains;" + Permissions-Policy "accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), interest-cohort=()" + X-Frame-Options SAMEORIGIN + X-XSS-Protection 1 + X-Robots-Tag none + -server + } +} +``` + ## todo - setup script to auto edits - db in homeserver.yml