bundles/matrix-synapse: media-repo needs more paths now

This commit is contained in:
Franzi 2024-07-12 18:39:09 +02:00
parent b2028855d1
commit 08f2c46c31
Signed by: kunsi
GPG key ID: 12E3D2136B818350

View file

@ -144,13 +144,14 @@ def nginx(metadata):
} }
if node.has_bundle('matrix-media-repo'): if node.has_bundle('matrix-media-repo'):
locations['/_matrix/media'] = { for path in ('/_matrix/media', '/_matrix/client/v1/media', '/_matrix/federation/v1/media'):
'target': 'http://localhost:20090', locations[path] = {
'max_body_size': '{}M'.format(metadata.get('matrix-media-repo/upload_max_mb')), 'target': 'http://localhost:20090',
# matrix-media-repo needs this to be the 'max_body_size': '{}M'.format(metadata.get('matrix-media-repo/upload_max_mb')),
# homeserver address. # matrix-media-repo needs this to be the
'x_forwarded_host': metadata.get('matrix-synapse/server_name'), # homeserver address.
} 'x_forwarded_host': metadata.get('matrix-synapse/server_name'),
}
vhosts = { vhosts = {
'matrix-synapse': { 'matrix-synapse': {