Welcome! Log In Create A New Profile

Advanced

Re: HttpSecureLinkModule timestamp inside uri

Valentin V. Bartenev
April 05, 2012 08:06AM
On Thursday 05 April 2012 12:56:32 nenad wrote:
> I would like to use HttpSecureLinkModule to restrict access to some
> member photos. Now I would like to have the timestamp inside the path
> but I'm not sure how to implement that.
>
> The timestamp I could get with \/t(\d+)\/ from uri, must I do a rewrite
> and if yes how? Or exist a "single" operation way?
>
> Photo-URL:
> www.example.aaa/260/7/4/3/4255/4543535/t1331894408/1234_x.jpg?a=1234567888
>
> location ~ _x\.(jpg|jpeg|gif|png)$ {
>
> secure_link $arg_a,$???;
> secure_link_md5 mysecretword$uri$???;
>
> root /media/photos
> ...
> }
>

location ~ t(?P<t>\d+)/\d+_x\.(?:jpe?g|gif|png)$ {

secure_link $arg_a,$t;
secure_link_md5 mysecretword$uri$t;

root /media/photos
...
}

wbr, Valentin V. Bartenev

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

HttpSecureLinkModule timestamp inside uri

nenad April 05, 2012 04:56AM

Re: HttpSecureLinkModule timestamp inside uri

Valentin V. Bartenev April 05, 2012 08:06AM

Re: HttpSecureLinkModule timestamp inside uri

nenad April 06, 2012 09:25AM

Re: HttpSecureLinkModule timestamp inside uri

Valentin V. Bartenev April 06, 2012 12:04PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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