From 74df8b603c091246beb4cca5f57b3209a4fdfe33 Mon Sep 17 00:00:00 2001 From: Tommy Date: Fri, 14 Jan 2022 06:07:46 -0500 Subject: [PATCH] Fix CORS for web clients https://matrix-org.github.io/synapse/latest/setup/installation.html /.well-known/matrix/client needs Access-Control-Allow-Origin * for web clients to work --- synapse.subdomain.conf.sample | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/synapse.subdomain.conf.sample b/synapse.subdomain.conf.sample index 6107f7f..26c004b 100644 --- a/synapse.subdomain.conf.sample +++ b/synapse.subdomain.conf.sample @@ -38,5 +38,10 @@ server { set $upstream_port 8008; set $upstream_proto http; proxy_pass $upstream_proto://$upstream_app:$upstream_port; + + location /.well-known/matrix/client { + default_type application/json; + add_header Access-Control-Allow-Origin *; + } } }