Rewrite backend in Rust, add Impressum, privacy policy and account tools

New axum server in backend/ with the same HTTP API and database as the
Python one. The pl8list session is only held in memory during the feed
crawl and logged out afterwards. Local sessions use a __Host- cookie,
30-day idle expiry and weekly token rotation; the old cookie is migrated.

The audio and image proxy only accepts known parameters, fixes the content
type, follows redirects only to pl8list's file host and caches segments and
images on disk. Strict security headers, origin checks on POST, body and
concurrency limits.

/impressum and /datenschutz are rendered from env variables. The account
menu offers data export, sign out on all devices and account deletion.
hls.js is self-hosted and artist images are proxied, so the browser only
talks to this server. The Docker image builds a static binary on scratch.
This commit is contained in:
nvrl committed 2026-11-01 12:02:37 +01:00
1 parent 61af1a6dd2
commit 54a436ae48
35 files changed
+6389 -42

No files matched your search

+14 -1
View File
@@ -2,5 +2,18 @@
# HOST=127.0.0.1
# PORT=8790
# PL8_DB=/data/pl8list.db
# CACHE_DIR=/data/cache # audio segments and images, default: next to the DB
# CACHE_MAX_MB=2048
# Set by compose.override.yaml when behind Traefik:
# TRUST_PROXY=1
# TRUSTED_PROXY_HOPS=1 # proxies that append to X-Forwarded-For (TRUST_PROXY=1 also means 1)
# PUBLIC_ORIGIN=https://pl8.narl.io
# Only for plain-http development from another machine (drops Secure, __Host-, HSTS):
# INSECURE_COOKIES=1
# Impressum and privacy policy. Required for a public site in Germany.
# Separate address lines with "|".
IMPRESSUM_NAME=
IMPRESSUM_ADDRESS=
IMPRESSUM_EMAIL=
IMPRESSUM_PHONE=
HOSTING_PROVIDER=