[arch-devops] [PATCH] Fixes #293
Fixes https://gitlab.archlinux.org/archlinux/infrastructure/-/issues/293 Signed-off-by: Amin Vakil <info@aminvakil.com> --- 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
Hi, I created a MR in https://gitlab.archlinux.org/archlinux/infrastructure/-/merge_requests/455 regarding this patch. If the patch needs to be changed, it will happen on gitlab, please comment there. Best Regards, Amin Vakil On 7/11/21 1:45 PM, Amin Vakil via arch-devops wrote:
Fixes https://gitlab.archlinux.org/archlinux/infrastructure/-/issues/293
Signed-off-by: Amin Vakil <info@aminvakil.com> --- 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"}'; }
participants (1)
-
Amin Vakil