From c1f6b139e79fe6ee0d053b8437d27c83292a1953 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Sun, 21 Dec 2025 01:06:53 +0000 Subject: [PATCH] feat: Add JWT authentication to video server Co-authored-by: mathieumoran1 --- README.md | 14 +++ __pycache__/video_server.cpython-312.pyc | Bin 17747 -> 21972 bytes public/js/app_player.js | 37 ++++++-- requirements.txt | 2 + video_server.py | 110 +++++++++++++++++++++-- 5 files changed, 148 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index e90f967..c9328ab 100644 --- a/README.md +++ b/README.md @@ -22,6 +22,20 @@ This repo also includes a small Python server that serves local video files with - Served as: `http://localhost:8001/media/` - List endpoint: `http://localhost:8001/api/media` +### Authentication (required) +By default, the Python server requires a valid Oscar-Pool JWT (same `JWT_SECRET` as your Node app). + +- The server loads `./.env` automatically (so it can reuse `JWT_SECRET`) +- The web player sends auth automatically: + - direct `/media/*` and `/hls/*` requests use `?token=` (needed for the `