From cbc0a1a927b2cf6e4b4aad675d80fb9a2fc96745 Mon Sep 17 00:00:00 2001 From: Franziska Kunsmann Date: Sun, 4 Jul 2021 20:03:22 +0200 Subject: [PATCH] nodes/htz.ex42-1048908: fix X-Forwarded-For header for matrix-media-repo --- bundles/nginx/files/site_template | 2 +- nodes/htz/ex42-1048908.py | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/bundles/nginx/files/site_template b/bundles/nginx/files/site_template index d63e544..1ab0149 100644 --- a/bundles/nginx/files/site_template +++ b/bundles/nginx/files/site_template @@ -99,7 +99,7 @@ server { % if ssl: proxy_set_header X-Forwarded-Proto HTTPS; % endif - proxy_set_header X-Forwarded-Host ${domain}; + proxy_set_header X-Forwarded-Host ${options.get('x_forwarded_host', domain)}; % for option, value in options.get('proxy_set_header', {}).items(): proxy_set_header ${option} ${value}; % endfor diff --git a/nodes/htz/ex42-1048908.py b/nodes/htz/ex42-1048908.py index 6edbb4e..f6d2418 100644 --- a/nodes/htz/ex42-1048908.py +++ b/nodes/htz/ex42-1048908.py @@ -358,6 +358,9 @@ nodes['htz.ex42-1048908'] = { '/_matrix/media': { 'target': 'http://localhost:20090', 'client_max_body_size': '500M', + # matrix-media-repo needs this to be the + # homeserver address. + 'x_forwarded_host': 'franzi.business', }, '/_synapse': { 'target': 'http://[::1]:20080',