Hello, can somebody help me with lua code ? Here is a code : location /02{ more_set_headers 'Content-Type: application/octet-stream'; auth_basic "Enter your login details !"; auth_basic_user_file pass.txt; set $Kon ''; rewrite_by_lua ' local res = ngx.location.capture("/urlcheck") ngx.var.Kon = res.body; '; if ($Kon = "allow") { proxy_pass http://127.0.0.1:9090; } } Code (markup): Problem is with rewrite or content_by_lua in "if" function not working but when I use set_by_lua is working but I need get capture information and store to $Kon ? Any onother way to connect set_by_lua and content_by_lua ( via some share memory ... ?!) Regards