How to use secure link module with IP
June 02, 2014 08:40AM
Hello all,

I searched all forums but could not find a good result.
I am streaming some MP4 files and i am using ngx_http_mp4_module for this.
I also implemented secure_link module too. But I could not find a way to implement IP based secure link.
I am creating secured links with PHP.
Could someone point me to a tutorial or show me how to config an IP based secure linked mp4 streaming server ?

Best Regards



Edited 1 time(s). Last edit at 06/02/2014 08:41AM by bruneor.
Re: How to use secure link module with IP
June 08, 2014 11:11AM
you have to do something like this:
secure_link $arg_token;
secure_link_md5 $remote_addr; (you may include other vars like user-agent, uri, etc...

the link will be like this:
http://www.domain.com/mp4/file.mp4?token=XXX

XXX is the token (have to be the same as secure_link_md5)
which in my example is md5($_SERVER['REMOTE_ADDR'])
Re: How to use secure link module with IP
June 10, 2014 07:29AM
Thank you Smile123,
You saved my day.
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 134
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready