Merge main into codex/fix-cctv-session-admission

Resolve the conflicts by keeping main's keyless CCTV gate, which already
refuses cross-site requests on every /api/cctv route and keeps the routes
reachable behind a reverse proxy, instead of the strict gate on /media/.
Keep the per-request client id the lease calls use, and both sides of the
CURRENT-STATE paragraphs and the media tests.
This commit is contained in:
German Khokhlov committed 2026-11-19 17:58:14 +04:00
commit 90e464eb5a
4310 files changed
+635935 -70111

No files matched your search

+4 -2
View File
@@ -6,7 +6,9 @@ export const HLS_LIMITS = Object.freeze({
leasesPerSession: 8,
leasesPerClient: 8,
playlistBytes: 256 * 1024,
segmentBytes: 4 * 1024 * 1024,
// High-resolution cameras can exceed 4 MiB in a single ten-second TS segment.
// Retained data still shares the independent 24 MiB session budget below.
segmentBytes: 8 * 1024 * 1024,
sessionBytes: 24 * 1024 * 1024,
segments: 12,
pollMs: 2000,
@@ -71,7 +73,7 @@ export async function fetchHlsBytes(
}
}
export function sameOriginHlsUrl(value, base) {
function sameOriginHlsUrl(value, base) {
const url = new URL(value, base);
if (
!['https:', 'http:'].includes(url.protocol) ||