mirror of
https://github.com/element-hq/synapse.git
synced 2024-12-14 11:57:44 +00:00
doc: Add delegation example to the caddy reverse proxy section (#10368)
This commit is contained in:
parent
28ffff73c1
commit
0ae95b3847
2 changed files with 28 additions and 0 deletions
1
changelog.d/10368.doc
Normal file
1
changelog.d/10368.doc
Normal file
|
@ -0,0 +1 @@
|
|||
Add delegation example for caddy in the reverse proxy documentation. Contributed by @moritzdietz.
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue