mirror of https://github.com/ErsatzTV/ErsatzTV.git
Browse Source
When JWT authentication is enabled (JWT__ISSUERSIGNINGKEY), ErsatzTV requires a valid token for all IPTV endpoints. HLS players typically request the playlist with the access_token query parameter, but segment requests (.ts files) do not include Authorization headers. The generated playlist previously produced segment URLs without the access_token parameter, causing segment requests to fail with 401 Unauthorized. This change propagates the access_token query parameter from the playlist request to all generated HLS segment URLs. Before: /iptv/hls-direct/1.ts?index=1 After: /iptv/hls-direct/1.ts?index=1&access_token=TOKEN This allows authenticated playback with HLS players that do not support sending Authorization headers for segment requests. Impact: - Fixes 401 errors when streaming with JWT enabled - Enables JWT-protected IPTV playback in common HLS players - Maintains backward compatibility when JWT authentication is disabled Testing: - Verified playback using IPTV Smarters - Confirmed HLS segment requests include access_token - Confirmed successful playback of protected streamspull/2888/head
6 changed files with 94 additions and 19 deletions
@ -1,6 +1,6 @@
@@ -1,6 +1,6 @@
|
||||
using ErsatzTV.Core; |
||||
using ErsatzTV.Core; |
||||
|
||||
namespace ErsatzTV.Application.Streaming; |
||||
|
||||
public record GetHlsPlaylistByChannelNumber(string Scheme, string Host, string ChannelNumber, string Mode) |
||||
public record GetHlsPlaylistByChannelNumber(string Scheme, string Host, string ChannelNumber, string Mode, string AccessToken) |
||||
: IRequest<Either<BaseError, string>>; |
||||
|
||||
Loading…
Reference in new issue