Hi,
I was wondering if this is a bug or not.
set $x 'true';
rewrite_by_lua '
ngx.var.x = "false"
ngx.log(ngx.NOTICE, "Value of x: ", ngx.var.x)
ngx.redirect("http://redirectedurl.com", 301)
';
The above configuration works and I get the notice in my log.
But when I move the redirect to the first line it stops working. Why is that?
set $x 'true';
rewrite_by_lua '
ngx.redirect("http://redirectedurl.com", 301)
ngx.var.x = "false"
ngx.log(ngx.NOTICE, "Value of x: ", ngx.var.x)
';