Added headers for proxy to enable Element to accept the .well-known stuff.

This commit is contained in:
Hans van Zijst 2024-11-13 18:02:38 +01:00 committed by Valentin Gagarin
parent cb207ade7f
commit 116ae14487
2 changed files with 8 additions and 0 deletions

View file

@ -66,6 +66,10 @@ server {
"org.matrix.msc3575.proxy": {"url": "https://vm02199.procolix.com"} "org.matrix.msc3575.proxy": {"url": "https://vm02199.procolix.com"}
}'; }';
default_type application/json; default_type application/json;
add_header 'Access-Control-Allow-Origin' '*';
add_header 'Access-Control-Allow-Methods' 'GET, POST, PUT, DELETE, OPTIONS';
add_header 'Access-Control-Allow-Headers' 'X-Requested-With, Content-Type, Authorization';
} }
location /.well-known/matrix/server { location /.well-known/matrix/server {
@ -92,6 +96,9 @@ http is forwarded to https.
Be sure to substitute the correct values for `server_name`, `base_url` and the Be sure to substitute the correct values for `server_name`, `base_url` and the
certificate files. certificate files.
The three `add_header` lines are absolutely necessary, but probably need some
tweaking. This is a TODO for this page.
For the actual proxy in front of Synapse, this is what you need: For the actual proxy in front of Synapse, this is what you need:
``` ```

View file

@ -171,3 +171,4 @@ Pointing clients to the correct server needs this at
Very important: both names (example.com and matrix.example.com) must be A Very important: both names (example.com and matrix.example.com) must be A
and/or AAAA records in DNS, not CNAME. and/or AAAA records in DNS, not CNAME.
See [nginx](../nginx) for details about how to publish this data.