summary refs log tree commit diff
path: root/develop/reverse_proxy.html
diff options
context:
space:
mode:
Diffstat (limited to 'develop/reverse_proxy.html')
-rw-r--r--develop/reverse_proxy.html26
1 files changed, 26 insertions, 0 deletions
diff --git a/develop/reverse_proxy.html b/develop/reverse_proxy.html

index 22d86118f4..2a72a4b026 100644 --- a/develop/reverse_proxy.html +++ b/develop/reverse_proxy.html
@@ -265,6 +265,32 @@ example.com:8448 { reverse_proxy http://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 &quot;*&quot; + header Access-Control-Allow-Methods &quot;GET, POST, PUT, DELETE, OPTIONS&quot; + header Access-Control-Allow-Headers &quot;Origin, X-Requested-With, Content-Type, Accept, Authorization&quot; + header Content-Type &quot;application/json&quot; +} + +example.com { + handle /.well-known/matrix/server { + import matrix-well-known-header + respond `{&quot;m.server&quot;:&quot;matrix.example.com:443&quot;}` + } + + handle /.well-known/matrix/client { + import matrix-well-known-header + respond `{&quot;m.homeserver&quot;:{&quot;base_url&quot;:&quot;https://matrix.example.com&quot;},&quot;m.identity_server&quot;:{&quot;base_url&quot;:&quot;https://identity.example.com&quot;}}` + } +} + +matrix.example.com { + reverse_proxy /_matrix/* http://localhost:8008 + reverse_proxy /_synapse/client/* http://localhost:8008 +} +</code></pre> <h3 id="apache"><a class="header" href="#apache">Apache</a></h3> <pre><code>&lt;VirtualHost *:443&gt; SSLEngine on