Welcome! Log In Create A New Profile

Advanced

Re: HttpSecureLinkModule Q?

António P. P. Almeida
December 22, 2010 07:54AM
On 22 Dez 2010 06h56 WET, nbubingo@gmail.com wrote:

>
> And the configuration (have not tested yet):
>
> location /p/ {
> secure_link $arg_st,$arg_e; # this must match the URI part related
> to the MD5 hash and expiration
> secure_link_md5 segredo$uri$arg_e; # this is how the MD5 hash is
> built from a secret token and an URI
>
> ## If the hash is incorrect then $secure_link is a null string.
> if ($secure_link = "") {
> return 403;
> }
>
> ## The current local time is greater than the specified expiration
> ## time.
> if ($secure_link = "0") {
> return 403;
> }
>
> ## If everything is ok $secure_link is 1.
> ## This needs to be here otherwise you'll get a 404.
> rewrite ^/p/(.*)$ /p/$1 break;
> }

I just tested it. It works.

--- appa


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

HttpSecureLinkModule Q?

izrodix December 20, 2010 05:44PM

Re: HttpSecureLinkModule Q?

Bdfy December 20, 2010 07:12PM

Re: HttpSecureLinkModule Q?

Weibin Yao December 20, 2010 08:54PM

Re: HttpSecureLinkModule Q?

izrodix December 21, 2010 03:49AM

Re: HttpSecureLinkModule Q?

Weibin Yao December 21, 2010 04:20AM

Re: HttpSecureLinkModule Q?

izrodix December 21, 2010 06:28AM

Re: HttpSecureLinkModule Q?

Weibin Yao December 21, 2010 09:28PM

Re: HttpSecureLinkModule Q?

António P. P. Almeida December 21, 2010 10:20PM

Re: HttpSecureLinkModule Q?

António P. P. Almeida December 22, 2010 01:04AM

Re: HttpSecureLinkModule Q?

Weibin Yao December 22, 2010 02:00AM

Re: HttpSecureLinkModule Q?

Sven 'Darkman' Michels December 22, 2010 02:16AM

Re: HttpSecureLinkModule Q?

António P. P. Almeida December 22, 2010 02:56AM

Re: HttpSecureLinkModule Q?

António P. P. Almeida December 22, 2010 07:54AM

Re: HttpSecureLinkModule Q?

izrodix December 25, 2010 03:06AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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