diff --git a/services/web-ui/nginx.conf b/services/web-ui/nginx.conf index 2590563..10db848 100644 --- a/services/web-ui/nginx.conf +++ b/services/web-ui/nginx.conf @@ -61,12 +61,19 @@ server { add_header Cache-Control "no-cache, no-store, must-revalidate"; } - # Live HLS — served from /live (bind-mounted capture live volume) + # Live HLS — served from /live (bind-mounted capture live volume). + # no-store (not just no-cache): with "no-cache" the browser still caches the + # playlist and serves a STALE copy to hls.js's reloads, so hls.js sees the + # live playlist as never advancing ("MISSED" forever) and never plays — the + # monitor stays black. no-store forbids caching entirely so every reload + # fetches the fresh live edge. Segments are short-lived; not caching them is + # fine for a live preview. location /live/ { alias /live/; types { application/vnd.apple.mpegurl m3u8; video/mp2t ts; } - add_header Cache-Control "no-cache"; - add_header Access-Control-Allow-Origin *; + add_header Cache-Control "no-store, no-cache, must-revalidate" always; + add_header Pragma "no-cache" always; + add_header Access-Control-Allow-Origin * always; } # Playout HLS preview — CasparCG sidecar writes to the media volume under @@ -74,8 +81,9 @@ server { location /media/live/ { alias /media/live/; types { application/vnd.apple.mpegurl m3u8; video/mp2t ts; } - add_header Cache-Control "no-cache"; - add_header Access-Control-Allow-Origin *; + add_header Cache-Control "no-store, no-cache, must-revalidate" always; + add_header Pragma "no-cache" always; + add_header Access-Control-Allow-Origin * always; } # API proxy - forward to mam-api service