@@ -206,6 +206,28 @@ backend matrix
206
206
server matrix 127.0.0.1:8008
207
207
```
208
208
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
+
209
231
### Relayd
210
232
211
233
```
0 commit comments