Skip to content

feat(live-news): add CNN & CNBC HLS streams via sidecar proxy#682

Merged
koala73 merged 2 commits intomainfrom
worktree-serialized-bouncing-pancake
Mar 1, 2026
Merged

feat(live-news): add CNN & CNBC HLS streams via sidecar proxy#682
koala73 merged 2 commits intomainfrom
worktree-serialized-bouncing-pancake

Conversation

@koala73
Copy link
Owner

@koala73 koala73 commented Mar 1, 2026

Summary

  • Add /api/hls-proxy sidecar route that proxies HLS manifests and segments from allowlisted CDN hosts, injecting the required Referer header browsers can't set
  • Rewrites m3u8 manifest URLs so all segments, variant playlists, and encryption keys route through the proxy
  • Add CNN channel to default and optional channel lists
  • CNBC and CNN use native <video> HLS playback on desktop; web falls through to YouTube (no Vercel bandwidth cost)
  • Fix pre-existing missing @types/dompurify dev dependency

Security

  • Host allowlist: only cdn-ca2-na.lncnetworks.host — not an open proxy
  • CORS: standard WorldMonitor origin restrictions
  • Route placed above auth gate (same pattern as /api/youtube-embed<video> can't carry auth headers)

Test plan

  • Desktop: switch to CNBC tab → native video player loads HLS stream
  • Desktop: switch to CNN tab → native video player loads HLS stream
  • Web: CNBC/CNN fall through to YouTube (no regression)
  • curl http://127.0.0.1:<port>/api/hls-proxy?url=https://cdn-ca2-na.lncnetworks.host/hls/cnbc_live/index.m3u8 → rewritten m3u8
  • Verify disallowed hosts return 403
  • HLS failure cooldown → falls back to YouTube embed after error

koala73 added 2 commits March 1, 2026 20:59
…p only)

Add /api/hls-proxy route to sidecar that proxies HLS manifests and
segments from allowlisted CDN hosts, injecting the required Referer
header that browsers cannot set. Rewrites m3u8 URLs so all segments
and encryption keys also route through the proxy.

Desktop gets native <video> HLS playback for CNN and CNBC; web falls
through to YouTube as before (no bandwidth cost on Vercel).
@chatgpt-codex-connector
Copy link

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@vercel
Copy link

vercel bot commented Mar 1, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
worldmonitor Building Building Preview, Comment Mar 1, 2026 5:03pm
worldmonitor-finance Building Building Preview, Comment Mar 1, 2026 5:03pm
worldmonitor-happy Building Building Preview, Comment Mar 1, 2026 5:03pm
worldmonitor-startup Building Building Preview, Comment Mar 1, 2026 5:03pm

Request Review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant