video stream and secure link

Valentin V. Bartenev ne at vbart.ru
Mon Jul 2 15:42:54 UTC 2012


On Monday 02 July 2012 18:25:15 aryut wrote:
> i'll try to explain again;
> 
> location /videos/ {
>    /*secure link module codes */
>     mp4;
> } //secure link and mp4 streaming & seeking works well
> 
> location /videos/ {
> 	/*secure link module codes */
> 	mp4;
> 	flv;
> } //secure links works. mp4 streaming & seeking doesnt works as should
> be.
> 
> location /videos/ {
> 	/*secure link module codes */
> 	location ~ \.mp4$ {
> 		mp4;
> 	}
> } //secure link doesn't works, mp4 streaming & seeking works.
> 
> 
> 
> location /videos/ {
> 	/*secure link module codes */
> 	mp4;
> 	location ~ \.flv$ {
> 		flv;
> 	}
> } //secure link works on mp4 extension, but doesn't works on flv.
> streamings & seekings works well.
> 
> 
> 
> location /videos/ {
> 	/*secure link module codes */
> 	location ~ \.mp4$ {
> 		mp4;
> 	}
> 	location ~ \.flv$ {
> 		flv;
> 	}
> } //secure link  doesn't works on flv and mp4. streamings & seekings
> works well.
> 

http://nginx.org/r/location
http://nginx.org/en/docs/http/ngx_http_rewrite_module.html
http://nginx.org/en/docs/http/ngx_http_secure_link_module.html

    location /videos/ { 
        secure_link $arg_st,$arg_e;
        secure_link_md5 ssss$remote_addr$uri$arg_e;

        location ~ \.mp4$ { 

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

                mp4;
        }

        location ~ \.flv$ {

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

                flv;
        }
    }


 wbr, Valentin V. Bartenev



More information about the nginx mailing list