HttpSecureLinkModule timestamp inside uri
Valentin V. Bartenev
ne at vbart.ru
Thu Apr 5 12:04:08 UTC 2012
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
More information about the nginx
mailing list