Welcome! Log In Create A New Profile

Advanced

Re: set $cookie_abc "$cookie_abc";

António P. P. Almeida
February 12, 2013 04:14AM
Do you really need to use Lua? It seems that the required logic can be done using the map directive. Explain clearly what you want to achieve.


--appa

amodpandey <nginx-forum@nginx.us> a écrit :

>Thank you for your response.
>
>Versions
>
>nginx versions tried nginx/1.2.5 and nginx/1.3.9
>LuaJIT 2.0.0
>
>What I want achive?
>
>Set the value of $cookie_abc to "a"/"b" (some logic) if the cookie value is
>not coming in the request else use the value set. I am doing this in
>
>server level
>
>set $cookie_abc "$cookie_abc";
>set $tmp_abc "";
>set_by_lua $tmp_abc '
> common.set_abc_cookie()
>';
>
>I am using set_by_lua to make sure the cookie value is set before the
>rewrites are evaluated.
>
>Why I am doing this?
>
>I have used $cookie_abc variable in my config and I want to have "a"/"b"
>value depending on a logic if the cookie is not passed.
>
>What is not working?
>
>inside common.set_abc_cookie()
>
>ngx.var.cookie_abc = "a" if the cookie is not passed.
>
>This is expected. That is why I am doing
>set $cookie_abc "$cookie_abc";
>
>Posted at Nginx Forum: http://forum.nginx.org/read.php?2,236075,236122#msg-236122
>
>_______________________________________________
>nginx mailing list
>nginx@nginx.org
>http://mailman.nginx.org/mailman/listinfo/nginx
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

set $cookie_abc "$cookie_abc";

amodpandey February 11, 2013 04:49AM

Re: set $cookie_abc "$cookie_abc";

Ruslan Ermilov February 11, 2013 05:14AM

Re: set $cookie_abc "$cookie_abc";

amodpandey February 11, 2013 08:41AM

Re: set $cookie_abc "$cookie_abc";

Valentin V. Bartenev February 11, 2013 11:06AM

Re: set $cookie_abc "$cookie_abc";

amodpandey February 11, 2013 01:07PM

Re: set $cookie_abc "$cookie_abc";

Valentin V. Bartenev February 11, 2013 01:18PM

Re: set $cookie_abc "$cookie_abc";

amodpandey February 11, 2013 01:21PM

Re: set $cookie_abc "$cookie_abc";

dbradfield February 11, 2013 01:54PM

Re: set $cookie_abc "$cookie_abc";

agentzh February 11, 2013 02:48PM

Re: set $cookie_abc "$cookie_abc";

amodpandey February 11, 2013 10:21PM

Re: set $cookie_abc "$cookie_abc";

agentzh February 12, 2013 02:58PM

Re: set $cookie_abc "$cookie_abc";

António P. P. Almeida February 12, 2013 04:14AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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