Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Commit 05ade03

Browse files
committed
Add delegation example to the caddy reverse proxy section
Signed-off-by: Moritz Dietz [email protected]
1 parent 8eddbde commit 05ade03

File tree

2 files changed

+32
-0
lines changed

2 files changed

+32
-0
lines changed

changelog.d/10368.doc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Add delegation example for caddy in the reverse proxy documentation. Contributed by @moritzdietz.

docs/reverse_proxy.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,37 @@ example.com:8448 {
9898
reverse_proxy http://localhost:8008
9999
}
100100
```
101+
[Delegation](delegate.md) example:
102+
```
103+
(matrix-well-known-header) {
104+
# Headers
105+
header Access-Control-Allow-Origin "*"
106+
header Access-Control-Allow-Methods "GET, POST, PUT, DELETE, OPTIONS"
107+
header Access-Control-Allow-Headers "Origin, X-Requested-With, Content-Type, Accept, Authorization"
108+
header Content-Type "application/json"
109+
}
110+
111+
example.com {
112+
handle /.well-known/matrix/server {
113+
import matrix-well-known-header
114+
respond `{"m.server":"matrix.example.com:8448"}`
115+
}
116+
117+
handle /.well-known/matrix/client {
118+
import matrix-well-known-header
119+
respond `{"m.homeserver":{"base_url":"https://matrix.example.com"},"m.identity_server":{"base_url":"https://identity.example.com}}`
120+
}
121+
}
122+
123+
matrix.example.com {
124+
reverse_proxy /_matrix/* http://localhost:8008
125+
reverse_proxy /_synapse/client/* http://localhost:8008
126+
}
127+
128+
matrix.example.com:8448 {
129+
reverse_proxy http://localhost:8008
130+
}
131+
```
101132

102133
### Apache
103134

0 commit comments

Comments
 (0)