Gena Makhomed
July 04, 2013 07:20AM
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
Subject Author Posted

HttpAccessKeyModule или HttpSecureLinkModule

shurik_saint July 03, 2013 02:38PM

Re: HttpAccessKeyModule или HttpSecureLinkModule

Андрей Урядов July 04, 2013 03:26AM

Re: HttpAccessKeyModule или HttpSecureLinkModule

shurik_saint July 04, 2013 03:41AM

Re: HttpAccessKeyModule или HttpSecureLinkModule

Андрей Урядов July 04, 2013 06:22AM

Re: HttpAccessKeyModule или HttpSecureLinkModule

Gena Makhomed July 04, 2013 07:20AM

Re: HttpAccessKeyModule или HttpSecureLinkModule

shurik_saint July 08, 2013 03:16PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 247
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