summary refs log tree commit diff
diff options
context:
space:
mode:
authorMoritz Dietz <moritzdietz@users.noreply.github.com>2021-07-14 18:50:30 +0200
committerGitHub <noreply@github.com>2021-07-14 18:50:30 +0200
commit0ae95b38474a4d64a4d5057499e645a3b81e3736 (patch)
treecadd6cf6ac75e87654116569e34173261f3b89ab
parentInstructions on installing RC debs (#10396) (diff)
downloadsynapse-0ae95b38474a4d64a4d5057499e645a3b81e3736.tar.xz
doc: Add delegation example to the caddy reverse proxy section (#10368)
Diffstat (limited to '')
-rw-r--r--changelog.d/10368.doc1
-rw-r--r--docs/reverse_proxy.md27
2 files changed, 28 insertions, 0 deletions
diff --git a/changelog.d/10368.doc b/changelog.d/10368.doc
new file mode 100644
index 0000000000..10297aa424
--- /dev/null
+++ b/changelog.d/10368.doc
@@ -0,0 +1 @@
+Add delegation example for caddy in the reverse proxy documentation. Contributed by @moritzdietz.
diff --git a/docs/reverse_proxy.md b/docs/reverse_proxy.md
index 01db466f96..0f3fbbed8b 100644
--- a/docs/reverse_proxy.md
+++ b/docs/reverse_proxy.md
@@ -98,6 +98,33 @@ example.com:8448 {
   reverse_proxy http://localhost:8008
 }
 ```
+[Delegation](delegate.md) example:
+```
+(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"}}`
+    }
+}
+
+matrix.example.com {
+    reverse_proxy /_matrix/* http://localhost:8008
+    reverse_proxy /_synapse/client/* http://localhost:8008
+}
+```
 
 ### Apache