Securing URLs with Secure Link + HLS

Paulo Paracatu paulo at cole.tec.br
Wed Aug 31 21:48:57 UTC 2022


Hi there,

As far as I know, you need to modify your m3u8 files to include the *hash*
and *expire* on every .ts segment. I used to stream HLS using the secure
link module and I remember needing to rewrite the files on-the-fly to make
them include those.

Nginx will not automatically generate a m3u8 file with all the hashes for
you. Unless things changed in the last few years and I'm outdated now, haha.


On Wed, Aug 31, 2022 at 6:43 PM LewisMM <nginx-forum at forum.nginx.org> wrote:

> Hi,
>
> I make a request with the .m3u8 file with the MD5 Hash and expiration. It
> receives a 200 code. Then the m3u8 playlist file tries to load the first
> segment in the playlist, however, I receive 403 "Not Authorised" error.
> Nginx isn't passing the MD5 hash and expiration to the segment file.
>
> Like so:
>
>
> http://0.0.0.0:80/video/hls/bunny.m3u8?md5=cAsEEb6J96haWy3CMOSgDg&expires=1672531140
>
> 200. Then tries to load segment (which is correct):
>
> http://0.0.0.0/video/hls/bunny.ts
>
> 403, forbidden.
>
> It's not passing the hash. It should be 200.
>
> I hope you understand my problem.
>
> Thanks.
>
> Posted at Nginx Forum:
> https://forum.nginx.org/read.php?2,295058,295065#msg-295065
>
> _______________________________________________
> nginx mailing list -- nginx at nginx.org
> To unsubscribe send an email to nginx-leave at nginx.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20220831/07603ebe/attachment.htm>


More information about the nginx mailing list