correct stream location

This commit is contained in:
Chris 2026-04-05 18:07:46 +01:00
parent a516fd72f6
commit 18d4924c5a
1 changed files with 10 additions and 5 deletions

View File

@ -26,12 +26,17 @@ server {
}
location /youtube/ {
# Use signed-URL auth if ?sig= is present, otherwise session auth
set $auth_endpoint /api/ping/;
if ($arg_sig) {
set $auth_endpoint /api/stream-auth/;
auth_request /api/ping/;
alias /youtube/;
types {
video/mp4 mp4;
}
auth_request $auth_endpoint;
}
# Signed-URL streaming endpoint for native player clients (VLC etc.)
# Requires ?sig=&expires= query args validated by /api/stream-auth/.
location /stream/ {
auth_request /api/stream-auth/;
alias /youtube/;
types {
video/mp4 mp4;