Welcome! Log In Create A New Profile

Advanced

Re: Transfering url arguments to different location

Jonathan Matthews
April 02, 2014 05:12AM
On 2 Apr 2014 07:31, "Cristian Rusu" <crirus@gmail.com> wrote:
>
> Hello
>
> I have a setup on nginx to count downloads.
>
>
> location / {.
> post_action /afterdownload;
>
> Here I have a value in $arg_key
>
> location /afterdownload {
>
> I need $arg_key here
>
> Any way to send it to /afterdownload section?

I believe it's available as a variable in that section already. You can add
it as a custom header or path component however you're most comfortable.
But why not reference it in the post_action statement? (I don't know that
post_action /can/ take variables, so this suggestion might be null and void
in the face of the documentation ... :-))

As an aside, IIRC people @nginx have stated publicly that post_action is a
hack, and that its behaviour should not be relied on. I'm without Internets
right now so can't find you the quote, but it was sufficient to put me off
using it for an audit function a while back. Plus it pollutes your access
logs with the final URI and/or response code served, not the first.

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

Transfering url arguments to different location

crirus April 02, 2014 02:32AM

Re: Transfering url arguments to different location

Jonathan Matthews April 02, 2014 05:12AM

Re: Transfering url arguments to different location

B.R. April 02, 2014 09:16AM

Re: Transfering url arguments to different location

Jonathan Matthews April 02, 2014 11:48AM

Re: Transfering url arguments to different location

B.R. April 02, 2014 01:52PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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