nginx-ui
nginx-ui copied to clipboard
Configuration Parse Error
location = /random {
set_by_lua_block $random {
return math.random(1, 100)
}
return 403 "Random number: $random";
}
This block produces the following error:
Nginx Configuration Parse Error
unexpected token BlockEnd (}) on line 38, column 7
It first appeared like 2 versions ago. With the latest release I noticed the site gets disabled when entering the edit mode (yet it stays enabled on the main page). This is a bit confusing.
Upd: This block may also produce the parse error.
location = /more {
content_by_lua '
-- more lua code here
';
}
Thanks for your report, this is a gonginx issue, https://github.com/tufanbarisyildirim/gonginx/issues/20. I will let you know if I fix it.