commit 4614eb5ca357cde4522301ec7fef33f7e54e4eba (tree) parent 98fea6176e05547a3d23a3bf766f16542783c011 Author: Motiejus Jakštys <motiejus@jakstys.lt> Date: Thu, 4 Sep 2025 05:52:27 +0300 clean up web server config a bit Diffstat:
| M | hosts/fwminex/configuration.nix | | | 37 | +++++++++++++++---------------------- |
1 file changed, 15 insertions(+), 22 deletions(-)
diff --git a/hosts/fwminex/configuration.nix b/hosts/fwminex/configuration.nix @@ -357,31 +357,24 @@ in precompressed zstd br gzip } - handle /.well-known/carddav { - redir https://cdav.migadu.com/ + @matrixMatch { + path /.well-known/matrix/client + path /.well-known/matrix/server } - handle /.well-known/caldav { - redir https://cdav.migadu.com/ - } - - @matrixMatch { - path /.well-known/matrix/client - path /.well-known/matrix/server - } - header @matrixMatch Content-Type application/json - header @matrixMatch Access-Control-Allow-Origin * - header @matrixMatch Cache-Control "public, max-age=3600, immutable" + header @matrixMatch Content-Type application/json + header @matrixMatch Access-Control-Allow-Origin * + header @matrixMatch Cache-Control "public, max-age=3600, immutable" - handle /.well-known/matrix/client { - respond "{\"m.homeserver\": {\"base_url\": \"https://jakstys.lt\"}}" 200 - } - handle /.well-known/matrix/server { - respond "{\"m.server\": \"jakstys.lt:443\"}" 200 - } + handle /.well-known/matrix/client { + respond "{\"m.homeserver\": {\"base_url\": \"https://jakstys.lt\"}}" 200 + } + handle /.well-known/matrix/server { + respond "{\"m.server\": \"jakstys.lt:443\"}" 200 + } - handle /_matrix/* { - reverse_proxy http://127.0.0.1:${toString myData.ports.matrix-synapse} - } + handle /_matrix/* { + reverse_proxy http://127.0.0.1:${toString myData.ports.matrix-synapse} + } ''; }; };