August 31, 2022 11:16AM
Hi,

I've been following this resource:
https://www.nginx.com/blog/securing-urls-secure-link-module-nginx-plus/

On that page, the final section "Securing Segment Files with an Expiration Date". It does not work.


map $uri $file_name {
default none;
"~*/s/(?<name>.*).m3u8" $name;
"~*/s/(?<name>.*).ts" $name;
}

server {
listen 80;
server_name secure-link-demo;

location /s {
root /opt;
secure_link $arg_md5,$arg_expires;
secure_link_md5 "$secure_link_expires$file_name$http_user_agent enigma";

if ($secure_link = "") { return 403; }
if ($secure_link = "0") { return 410; }
}
}


This works with the .M3U8 playlist file. It successfully secures it. However, when the playlist tries to load the segment files (.ts) files, I get a 403 error. Nginx is not passing the MD5 hash to the segment files.

Does anyone know how to fix this?
Subject Author Posted

Securing URLs with Secure Link + HLS

LewisMM August 31, 2022 11:16AM

Re: Securing URLs with Secure Link + HLS

Francis Daly August 31, 2022 05:26PM

Re: Securing URLs with Secure Link + HLS

LewisMM August 31, 2022 05:42PM

Re: Securing URLs with Secure Link + HLS

Paulo Paracatu August 31, 2022 05:50PM

Re: Securing URLs with Secure Link + HLS

LewisMM August 31, 2022 06:13PM

Re: Securing URLs with Secure Link + HLS

Francis Daly August 31, 2022 06:20PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 255
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready