Configuration options for media redirect
This commit is contained in:
@@ -2182,6 +2182,39 @@ media_upload_limits:
|
||||
max_size: 500M
|
||||
```
|
||||
---
|
||||
### `media_redirect`
|
||||
|
||||
*(object)* When enabled, Synapse will use HTTP redirect responses to serve media instead of directly serving the media from the media store. This can help with caching, but requires /_synapse/media/* to be routed to the media worker.
|
||||
|
||||
This setting has the following sub-options:
|
||||
|
||||
* `enabled` (boolean): Enables the media redirect feature. If enabled, you must specify a `media_redirect.secret` or `media_redirect.secret_path`. Defaults to `false`.
|
||||
|
||||
* `secret` (string): Secret used to sign media redirect URLs. This must be set if `media_redirect.enabled` is set. Defaults to `null`.
|
||||
|
||||
* `secret_path` (string): An alternative to `media_redirect.secret` that specifies a file containing the secret. Defaults to `null`.
|
||||
|
||||
* `ttl` (duration): How long the redirect URLs should be valid for. Defaults to `"10m"`.
|
||||
|
||||
Default configuration:
|
||||
```yaml
|
||||
media_redirect:
|
||||
enabled: false
|
||||
```
|
||||
|
||||
Example configurations:
|
||||
```yaml
|
||||
media_redirect:
|
||||
enabled: true
|
||||
secret: aiCh9gu4Zahvueveisooquu7chaiw9Ee
|
||||
```
|
||||
|
||||
```yaml
|
||||
media_redirect:
|
||||
enabled: true
|
||||
secret_path: /path/to/secrets/file
|
||||
```
|
||||
---
|
||||
### `max_image_pixels`
|
||||
|
||||
*(byte size)* Maximum number of pixels that will be thumbnailed. Defaults to `"32M"`.
|
||||
|
||||
Reference in New Issue
Block a user