Skip to content

Commit

Permalink
Add missing sections
Browse files Browse the repository at this point in the history
  • Loading branch information
Fizzadar committed Aug 8, 2022
1 parent f1ca606 commit 86123b0
Showing 1 changed file with 36 additions and 2 deletions.
38 changes: 36 additions & 2 deletions proposals/3859-well-known-media-domain.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ domain offers maximum flexibility for server owners.
Add a new optional field, `m.media_server` that can specify a separate URL to be used for media requests. Clients can
then optionally use this field for all media endpoints, including both download and upload.

```
```json
{
"m.homeserver": {
"base_url": "https://matrix.example.com"
Expand All @@ -35,11 +35,45 @@ proxy or some other backend system).

This is the same as above but for the server endpoint:

```
```json
{
"m.server": "matrix.example.com:443",
"m.media_server": "matrix-media.example.com:443"
}
```

As above, the non-media endpoint must also serve media requests.


## Alternatives

### Redirects

For the download path, the homeserver could send a redirect response to a CDN backed domain. This is proposed in
MSC3860.

For the upload path this is not possible under HTTP.


## Security Considerations

Server admins may have to manage two distinct domains/installs increasing management & attack vector.


## Unstable Prefix

While not released in the Matrix spec implementations should use field `com.beeper.msc3859.m.media_server` in place of
`m.media_server` in the well known responses:

```json
# Client
{
"com.beeper.msc3859.m.media_server": {
"base_url": "https://matrix-media.example.com"
}
}
# Server
{
"com.beeper.msc3859.m.media_server": "matrix-media.example.com:443"
}
```

0 comments on commit 86123b0

Please sign in to comment.