Hello!
On Tue, Nov 18, 2014 at 11:16 PM, Pradeep L wrote:
> proxy_pass http://127.0.0.1:8080/manager/html;
> header_filter_by_lua ' print("ENTERING ")
> if ngx.var.cookie_JSESSIONID == nil then
> print("JSESSIONID is missing")
> else
>
I'm afraid you're confusing cookies sent from the server and cookies
sent from the client here. They're different. The $cookie_XXX
variables are only for reading cookies sent from the client (extracted
from the Cookie request headers).
For your use case, you want the other way around, that is, cookies
from the server. So you need to inspect the Set-Cookie response header
instead in your Lua code.
Regards,
-agentzh