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

Commit d9b7141

Browse files
authored
Add HAProxy delegation example to docs (#12501)
Signed-off-by: Ville Petteri Huh
1 parent a36a38b commit d9b7141

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed

changelog.d/12501.doc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Add HAProxy delegation example with CORS headers to docs.

docs/reverse_proxy.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,28 @@ backend matrix
206206
server matrix 127.0.0.1:8008
207207
```
208208

209+
210+
[Delegation](delegate.md) example:
211+
```
212+
frontend https
213+
acl matrix-well-known-client-path path /.well-known/matrix/client
214+
acl matrix-well-known-server-path path /.well-known/matrix/server
215+
use_backend matrix-well-known-client if matrix-well-known-client-path
216+
use_backend matrix-well-known-server if matrix-well-known-server-path
217+
218+
backend matrix-well-known-client
219+
http-after-response set-header Access-Control-Allow-Origin "*"
220+
http-after-response set-header Access-Control-Allow-Methods "GET, POST, PUT, DELETE, OPTIONS"
221+
http-after-response set-header Access-Control-Allow-Headers "Origin, X-Requested-With, Content-Type, Accept, Authorization"
222+
http-request return status 200 content-type application/json string '{"m.homeserver":{"base_url":"https://matrix.example.com"},"m.identity_server":{"base_url":"https://identity.example.com"}}'
223+
224+
backend matrix-well-known-server
225+
http-after-response set-header Access-Control-Allow-Origin "*"
226+
http-after-response set-header Access-Control-Allow-Methods "GET, POST, PUT, DELETE, OPTIONS"
227+
http-after-response set-header Access-Control-Allow-Headers "Origin, X-Requested-With, Content-Type, Accept, Authorization"
228+
http-request return status 200 content-type application/json string '{"m.server":"matrix.example.com:443"}'
229+
```
230+
209231
### Relayd
210232

211233
```

0 commit comments

Comments
 (0)