diff --git a/Caddyfile b/Caddyfile index b0773fc..4793065 100644 --- a/Caddyfile +++ b/Caddyfile @@ -23,22 +23,4 @@ } } -(matrix-well-known) { - handle /.well-known/matrix/* { - header Access-Control-Allow-Origin "*" - header Access-Control-Allow-Methods "GET, POST, PUT, DELETE, OPTIONS" - header Access-Control-Allow-Headers "Origin, X-Requested-With, Content-Type, Accept, Authorization" - header Content-Type "application/json" - - respond /.well-known/matrix/client 200 { - body `{"m.homeserver": {"base_url": "https://matrix.boba.best"}}` - close - } - respond /.well-known/matrix/server 200 { - body `{"m.server": "matrix.boba.best:443"}` - close - } - } -} - import conf.d/* diff --git a/conf.d/boba.best b/conf.d/boba.best index e77cb39..cf4e8c6 100644 --- a/conf.d/boba.best +++ b/conf.d/boba.best @@ -4,7 +4,21 @@ www.boba.best { redir https://boba.best{uri} } boba.best { - import matrix-well-known + handle /.well-known/matrix/* { + header Access-Control-Allow-Origin "*" + header Access-Control-Allow-Methods "GET, POST, PUT, DELETE, OPTIONS" + header Access-Control-Allow-Headers "Origin, X-Requested-With, Content-Type, Accept, Authorization" + header Content-Type "application/json" + + respond /.well-known/matrix/client 200 { + body `{"m.homeserver": {"base_url": "https://matrix.boba.best"}}` + close + } + respond /.well-known/matrix/server 200 { + body `{"m.server": "matrix.boba.best:443"}` + close + } + } header Access-Control-Allow-Origin * root * /var/www/boba.best/public diff --git a/conf.d/matrix.boba.best b/conf.d/matrix.boba.best index 0d83d3e..0832d53 100644 --- a/conf.d/matrix.boba.best +++ b/conf.d/matrix.boba.best @@ -3,8 +3,6 @@ matrix.boba.best { encode zstd gzip - import matrix-well-known - redir /admin /admin/ handle_path /admin/* {