diff options
author | erikjohnston <erikjohnston@users.noreply.github.com> | 2022-07-25 16:08:12 +0000 |
---|---|---|
committer | erikjohnston <erikjohnston@users.noreply.github.com> | 2022-07-25 16:08:12 +0000 |
commit | 1dd16e9b08c68111f22129b439a3c993011c4ae3 (patch) | |
tree | dc5c7b0b7be233cb3cece293c41fae2c59088855 /develop/reverse_proxy.html | |
parent | deploy: e8519e0ed289b67fa07c1bdbb6898852dc1a50b9 (diff) | |
download | synapse-1dd16e9b08c68111f22129b439a3c993011c4ae3.tar.xz |
deploy: 935e73efed922993a360b4e1e10a2fa4a2f77c84
Diffstat (limited to 'develop/reverse_proxy.html')
-rw-r--r-- | develop/reverse_proxy.html | 50 |
1 files changed, 10 insertions, 40 deletions
diff --git a/develop/reverse_proxy.html b/develop/reverse_proxy.html index f1b836d8d2..773ec6bc3e 100644 --- a/develop/reverse_proxy.html +++ b/develop/reverse_proxy.html @@ -211,57 +211,27 @@ to proxied traffic.)</p> } } </code></pre> -<h3 id="caddy-v1"><a class="header" href="#caddy-v1">Caddy v1</a></h3> -<pre><code>matrix.example.com { - proxy /_matrix http://localhost:8008 { - transparent - } - - proxy /_synapse/client http://localhost:8008 { - transparent - } -} - -example.com:8448 { - proxy / http://localhost:8008 { - transparent - } -} -</code></pre> <h3 id="caddy-v2"><a class="header" href="#caddy-v2">Caddy v2</a></h3> <pre><code>matrix.example.com { - reverse_proxy /_matrix/* http://localhost:8008 - reverse_proxy /_synapse/client/* http://localhost:8008 + reverse_proxy /_matrix/* localhost:8008 + reverse_proxy /_synapse/client/* localhost:8008 } example.com:8448 { - reverse_proxy http://localhost:8008 + reverse_proxy localhost:8008 } </code></pre> <p><a href="delegate.html">Delegation</a> example:</p> -<pre><code>(matrix-well-known-header) { - # Headers - header Access-Control-Allow-Origin "*" - header Access-Control-Allow-Methods "GET, POST, PUT, DELETE, OPTIONS" - header Access-Control-Allow-Headers "Origin, X-Requested-With, Content-Type, Accept, Authorization" - header Content-Type "application/json" -} - -example.com { - handle /.well-known/matrix/server { - import matrix-well-known-header - respond `{"m.server":"matrix.example.com:443"}` - } - - handle /.well-known/matrix/client { - import matrix-well-known-header - respond `{"m.homeserver":{"base_url":"https://matrix.example.com"},"m.identity_server":{"base_url":"https://identity.example.com"}}` - } +<pre><code>example.com { + header /.well-known/matrix/* Content-Type application/json + header /.well-known/matrix/* Access-Control-Allow-Origin * + respond /.well-known/matrix/server `{"m.server": "matrix.example.com:443"}` + respond /.well-known/matrix/client `{"m.homeserver":{"base_url":"https://matrix.example.com"},"m.identity_server":{"base_url":"https://identity.example.com"}}` } matrix.example.com { - reverse_proxy /_matrix/* http://localhost:8008 - reverse_proxy /_synapse/client/* http://localhost:8008 + reverse_proxy /_matrix/* localhost:8008 + reverse_proxy /_synapse/client/* localhost:8008 } </code></pre> <h3 id="apache"><a class="header" href="#apache">Apache</a></h3> |