nginx-ui icon indicating copy to clipboard operation
nginx-ui copied to clipboard

Configuration Parse Error

Open tamr opened this issue 1 year ago • 1 comments

  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
    ';
   }

tamr avatar Feb 19 '24 11:02 tamr

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.

0xJacky avatar Feb 19 '24 11:02 0xJacky