Fixes https://gitlab.archlinux.org/archlinux/infrastructure/-/issues/293
Signed-off-by: Amin Vakil
---
roles/archweb/templates/maintenance-nginx.d.conf.j2 | 2 +-
roles/archweb/templates/nginx.d.conf.j2 | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/roles/archweb/templates/maintenance-nginx.d.conf.j2
b/roles/archweb/templates/maintenance-nginx.d.conf.j2
index 5b5a1c4f..889d7785 100644
--- a/roles/archweb/templates/maintenance-nginx.d.conf.j2
+++ b/roles/archweb/templates/maintenance-nginx.d.conf.j2
@@ -78,7 +78,7 @@ server {
error_page 503 /503.html;
- location /.well-known/matrix/server {
+ location ~* /.well-known/matrix/server($|/) {
default_type application/json;
return 200 '{"m.server": "{{ matrix_domain }}:443"}';
}
diff --git a/roles/archweb/templates/nginx.d.conf.j2
b/roles/archweb/templates/nginx.d.conf.j2
index 74201a62..dc56c63c 100644
--- a/roles/archweb/templates/nginx.d.conf.j2
+++ b/roles/archweb/templates/nginx.d.conf.j2
@@ -104,7 +104,7 @@ server {
ssl_certificate_key /etc/letsencrypt/live/{{ archweb_domain
}}/privkey.pem;
ssl_trusted_certificate /etc/letsencrypt/live/{{ archweb_domain
}}/chain.pem;
- location /.well-known/matrix/server {
+ location ~* /.well-known/matrix/server($|/) {
default_type application/json;
return 200 '{"m.server": "{{ matrix_domain }}:443"}';
}
--
2.32.0