Drop-in server for Matrix URL previews, for servers like Dendrite that don't support them natively.
Find a file
2024-02-10 01:57:03 +00:00
.gitignore Initial commit 2024-02-09 22:37:15 +00:00
Dockerfile Initial commit 2024-02-09 22:37:15 +00:00
LICENSE Initial commit 2024-02-09 22:37:15 +00:00
README.md Add gitignore 2024-02-09 22:36:33 +00:00
requirements.txt Use an sqlite cache 2024-02-10 01:52:20 +00:00
server.py Remove deprecated code thing 2024-02-10 01:57:03 +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.

pip install -r requirements.txt
PREVIEW_HOMESERVER=https://example.com python3 server.py

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.