From 805280355cc6044d85c1c394b468cda12ad7e7b6 Mon Sep 17 00:00:00 2001 From: Michael Hollister Date: Sat, 16 Dec 2023 16:52:04 -0600 Subject: [PATCH] Changed mxc links to matrix_domain instead of matrix_server_fqn_matrix --- roles/custom/matrix-media-repo/defaults/main.yml | 2 +- .../templates/nginx/conf.d/matrix-domain.conf.j2 | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/roles/custom/matrix-media-repo/defaults/main.yml b/roles/custom/matrix-media-repo/defaults/main.yml index 8aada0896..31bf4bd5b 100644 --- a/roles/custom/matrix-media-repo/defaults/main.yml +++ b/roles/custom/matrix-media-repo/defaults/main.yml @@ -153,7 +153,7 @@ matrix_media_repo_homeservers_auto: # This should match the server_name of your homeserver, and the Host header # provided to the media repo. - name: "{{ matrix_server_fqn_matrix }}" + name: "{{ matrix_domain }}" # The base URL to where the homeserver can actually be reached by MMR. csApi: "http://{{ matrix_nginx_proxy_proxy_matrix_client_api_addr_with_container }}" diff --git a/roles/custom/matrix-nginx-proxy/templates/nginx/conf.d/matrix-domain.conf.j2 b/roles/custom/matrix-nginx-proxy/templates/nginx/conf.d/matrix-domain.conf.j2 index cbaf5ead1..d9e2d1037 100644 --- a/roles/custom/matrix-nginx-proxy/templates/nginx/conf.d/matrix-domain.conf.j2 +++ b/roles/custom/matrix-nginx-proxy/templates/nginx/conf.d/matrix-domain.conf.j2 @@ -110,7 +110,7 @@ # Make sure this matches your homeserver in media-repo.yaml # You may have to manually specify it if using delegation or the # incoming Host doesn't match. - proxy_set_header Host $host; + proxy_set_header Host {{ matrix_domain }}; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $remote_addr; @@ -136,7 +136,7 @@ # Make sure this matches your homeserver in media-repo.yaml # You may have to manually specify it if using delegation or the # incoming Host doesn't match. - proxy_set_header Host $host; + proxy_set_header Host {{ matrix_domain }}; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $remote_addr; @@ -159,7 +159,7 @@ # Make sure this matches your homeserver in media-repo.yaml # You may have to manually specify it if using delegation or the # incoming Host doesn't match. - proxy_set_header Host $host; + proxy_set_header Host {{ matrix_domain }}; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $remote_addr; @@ -180,7 +180,7 @@ # Make sure this matches your homeserver in media-repo.yaml # You may have to manually specify it if using delegation or the # incoming Host doesn't match. - proxy_set_header Host $host; + proxy_set_header Host {{ matrix_domain }}; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $remote_addr; @@ -406,7 +406,7 @@ server { # Make sure this matches your homeserver in media-repo.yaml # You may have to manually specify it if using delegation or the # incoming Host doesn't match. - proxy_set_header Host $host; + proxy_set_header Host {{ matrix_domain }}; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $remote_addr; @@ -432,7 +432,7 @@ server { # Make sure this matches your homeserver in media-repo.yaml # You may have to manually specify it if using delegation or the # incoming Host doesn't match. - proxy_set_header Host $host; + proxy_set_header Host {{ matrix_domain }}; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $remote_addr; @@ -455,7 +455,7 @@ server { # Make sure this matches your homeserver in media-repo.yaml # You may have to manually specify it if using delegation or the # incoming Host doesn't match. - proxy_set_header Host $host; + proxy_set_header Host {{ matrix_domain }}; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $remote_addr; @@ -476,7 +476,7 @@ server { # Make sure this matches your homeserver in media-repo.yaml # You may have to manually specify it if using delegation or the # incoming Host doesn't match. - proxy_set_header Host $host; + proxy_set_header Host {{ matrix_domain }}; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $remote_addr;