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;