diff options
author | Rasmus Thomsen <oss@cogitri.dev> | 2021-06-07 12:06:57 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-07 11:06:57 +0100 |
commit | 2c9a390fa67aa80bd8cfffb02b20739d0b1807d8 (patch) | |
tree | c7a7616c50d1ccb118b8ed92b55ba299e1768a4f /docs | |
parent | caa5c89ecb46f14e612bbabd472b31d767f76a23 (diff) |
Add CORS to nginx config (#1791)
Without this entry, setups where users have the homeserver on the URL
matrix.myurl.com but want the servername to be myurl.com don't work by default
since clients like element.io can't connect to the homeserver
Diffstat (limited to 'docs')
-rw-r--r-- | docs/nginx/monolith-sample.conf | 3 | ||||
-rw-r--r-- | docs/nginx/polylith-sample.conf | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/docs/nginx/monolith-sample.conf b/docs/nginx/monolith-sample.conf index f5461d52..0344aa96 100644 --- a/docs/nginx/monolith-sample.conf +++ b/docs/nginx/monolith-sample.conf @@ -16,6 +16,9 @@ server { } location /.well-known/matrix/client { + # If your sever_name here doesn't match your matrix homeserver URL + # (e.g. hostname.com as server_name and matrix.hostname.com as homeserver URL) + # add_header Access-Control-Allow-Origin '*'; return 200 '{ "m.homeserver": { "base_url": "https://my.hostname.com" } }'; } diff --git a/docs/nginx/polylith-sample.conf b/docs/nginx/polylith-sample.conf index 7e8eb4a5..274d7565 100644 --- a/docs/nginx/polylith-sample.conf +++ b/docs/nginx/polylith-sample.conf @@ -16,6 +16,9 @@ server { } location /.well-known/matrix/client { + # If your sever_name here doesn't match your matrix homeserver URL + # (e.g. hostname.com as server_name and matrix.hostname.com as homeserver URL) + # add_header Access-Control-Allow-Origin '*'; return 200 '{ "m.homeserver": { "base_url": "https://my.hostname.com" } }'; } |