Benenne Matrix-Discovery-Dateien in JSON um
This commit is contained in:
parent
17b751262c
commit
11508a8139
4 changed files with 24 additions and 3 deletions
|
|
@ -10,8 +10,8 @@ Matrix-Discovery-Dateien unter `.well-known/matrix/` bereit.
|
|||
- Dunkle, responsive Landingpage ohne externe Frameworks
|
||||
- Klassische statische Dateien: `index.html`, `style.css`, `script.js`
|
||||
- Matrix Homeserver Discovery:
|
||||
- `/.well-known/matrix/server`
|
||||
- `/.well-known/matrix/client`
|
||||
- `/.well-known/matrix/server` aus `.well-known/matrix/server.json`
|
||||
- `/.well-known/matrix/client` aus `.well-known/matrix/client.json`
|
||||
- Dockerfile fuer eine einfache Nginx-Auslieferung
|
||||
|
||||
## Matrix
|
||||
|
|
@ -28,7 +28,9 @@ Matrix-Discovery-Dateien unter `.well-known/matrix/` bereit.
|
|||
{"m.homeserver":{"base_url":"https://matrix.rastus01.com"}}
|
||||
```
|
||||
|
||||
Wichtig: Diese Dateien haben absichtlich keine `.json`-Dateiendung.
|
||||
Die Dateien liegen im Repository mit `.json`-Dateiendung. Nginx liefert die
|
||||
Matrix-Discovery-Endpunkte weiterhin ohne `.json` aus, damit Clients die
|
||||
standardisierten URLs finden.
|
||||
|
||||
## Lokal mit Docker
|
||||
|
||||
|
|
|
|||
19
nginx.conf
19
nginx.conf
|
|
@ -10,6 +10,12 @@ server {
|
|||
}
|
||||
|
||||
location = /.well-known/matrix/server {
|
||||
default_type application/json;
|
||||
add_header Access-Control-Allow-Origin "*" always;
|
||||
try_files /.well-known/matrix/server.json =404;
|
||||
}
|
||||
|
||||
location = /.well-known/matrix/server.json {
|
||||
default_type application/json;
|
||||
add_header Access-Control-Allow-Origin "*" always;
|
||||
try_files $uri =404;
|
||||
|
|
@ -25,6 +31,19 @@ server {
|
|||
return 204;
|
||||
}
|
||||
|
||||
try_files /.well-known/matrix/client.json =404;
|
||||
}
|
||||
|
||||
location = /.well-known/matrix/client.json {
|
||||
default_type application/json;
|
||||
add_header Access-Control-Allow-Origin "*" always;
|
||||
add_header Access-Control-Allow-Methods "GET, OPTIONS" always;
|
||||
add_header Access-Control-Allow-Headers "Content-Type" always;
|
||||
|
||||
if ($request_method = OPTIONS) {
|
||||
return 204;
|
||||
}
|
||||
|
||||
try_files $uri =404;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue