From e981ea326ff9d9b12596fd93c12ded4fdff2c146 Mon Sep 17 00:00:00 2001 From: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com> Date: Sat, 7 Nov 2026 15:38:23 -0600 Subject: [PATCH] use sub_filter to pass vod playlist args to segment URLs Home Assistant signs vod playlist URLs with authSig and needs it on every init, segment, and index URL in the playlist. sub_filter appends the request args to the three URL endings vod writes, giving byte-identical playlists to the old secure_token output. --- docker/main/rootfs/usr/local/nginx/conf/nginx.conf | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/docker/main/rootfs/usr/local/nginx/conf/nginx.conf b/docker/main/rootfs/usr/local/nginx/conf/nginx.conf index 6709ae2588..cf9a567216 100644 --- a/docker/main/rootfs/usr/local/nginx/conf/nginx.conf +++ b/docker/main/rootfs/usr/local/nginx/conf/nginx.conf @@ -143,6 +143,15 @@ http { # version 6 (RFC 8216 section 7); the module default is 4 vod_hls_version 6; + # Pass the playlist's query args (e.g. Home Assistant's authSig) on + # to every URL in it. These match the only URL endings vod writes + # with fmp4 and no subtitles. + sub_filter_types application/vnd.apple.mpegurl; + sub_filter_once off; + sub_filter '.m3u8' '.m3u8$is_args$args'; + sub_filter '.m4s' '.m4s$is_args$args'; + sub_filter '.mp4"' '.mp4$is_args$args"'; + include security_headers.conf; add_header Cache-Control "no-store"; expires off;