Welcome! Log In Create A New Profile

Advanced

secure link with flv issue

Posted by geez 
secure link with flv issue
October 22, 2009 02:35AM
Hi,

I'm currently implementing a video site with nginx and am having a little trouble with the secure link module and dynamic requests. The config below works fine as long as there are no queries on the url.
(eg http://test.com/One/xxxxx/x/xxxxxxx/movie.flv works,
but not "http://test.com/One/xxxxx/x/xxxxxxx/movie.flv?start=0")

[code]
location ~ "^/(One|Two)" {

if ($uri ~ "^/(One|Two)/([a-z0-9]{40})/([a-z0-9]/[a-z0-9]{7})/movie.flv") {
set $selectedArray $1;
}

secure_link_secret "testSecret";
secure_link_ttl on;
if ($secure_link = "") {
return 403;
}

root /data/array$selectedArray;
rewrite ^ /flvStor/$secure_link break;
flv;

}
[/code]


I'd most appreciate some help :-)

I'm not able to really host videos properly if i can't send a starting position.

I believe I could implement a check with PHP if the request is valid and then serve via the X-Accel-Redirect option, but I was hoping to do it using this method as then I wouldn't have to revert to the PHP FCGI stack constantly.

Pointers ? Theories ?
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 67
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready