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

doc: Add delegation example to the caddy reverse proxy section #10368

Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/10368.doc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add delegation example for caddy in the reverse proxy documentation. Contributed by @moritzdietz.
31 changes: 31 additions & 0 deletions docs/reverse_proxy.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,37 @@ 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:8448"}`
moritzdietz marked this conversation as resolved.
Show resolved Hide resolved
}

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
}

matrix.example.com:8448 {
moritzdietz marked this conversation as resolved.
Show resolved Hide resolved
reverse_proxy http://localhost:8008
}
```

### Apache

Expand Down