On 04.07.2013 13:21, Андрей Урядов wrote:
> set $fileName '';
> set $secretKey '';
> if ($request_uri ~* ^/path_to_files/([0-9a-z]+)/(.+)$) {
> set $fileName $2;
> set $secretKey $1;
> }
> set $rightKey 0;
> if (-f /path_to_download_keys/download_key/$remote_addr-$secretKey) {
> set $rightKey 1;
> rewrite ^(.*)$ /path_to_files/$fileName break;
> }
> if ( $rightKey != 1) {
> return 404;
> }
http://nginx.org/ru/docs/http/ngx_http_secure_link_module.html
--
Best regards,
Gena
_______________________________________________
nginx-ru mailing list
nginx-ru@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-ru