drop-in-url-previews/README.md

34 lines
912 B
Markdown
Raw Normal View History

2024-02-09 22:36:33 +00:00
# Drop In URL previews server
A simple python server that handles /_matrix/media/*/preview_url requests, for servers like Dendrite.
## Installation
Just use docker.
Or you can run it yourself, but that's your choice.
```bash
pip install -r requirements.txt
PREVIEW_HOMESERVER=https://example.com python3 server.py
```
2024-02-10 02:04:12 +00:00
### Example docker-compose.yml
```yaml
version: "3"
services:
url_previews:
environment:
- "PREVIEW_HOMESERVER=https://matrix.nexy7574.co.uk"
ports:
- "2226:2226"
restart: "unless-stopped"
container_name: "dendrite-url-previews"
volumes:
- ./data/:/app/data/
build: . # there's no pre-built image
```
2024-02-09 22:36:33 +00:00
## Configuration
The only configuration option is `PREVIEW_HOMESERVER`, which is the homeserver to use for the previews.
If not specified, it defaults to the host name of the request URL, which may not work in some reverse-proxy
environments.