<%# Legacy LuCI view (19.07 / Lean LEDE): mounts the native EdNovas app in the admin page (no iframe, no exposed port). API calls go through the sysauth-protected controller proxy to the loopback-only agent. -%> <%+header%> <% local fs = require "nixio.fs" local ver = (fs.readfile("/usr/share/ednovas/VERSION") or ""):gsub("%s+", "") if ver == "" then ver = "0" end -- maxBody: the largest raw POST body this LuCI hands the controller intact. -- A non-form body is buffered up to HTTP_MAX_CONTENT and silently CUT past -- it (Lean's classic LuCI: 8 KiB in luci.http.protocol; 18.06/19.07: -- 100 KiB in luci.http). The app sizes its config-upload chunks from it. -- pcall: either module may be absent; 8 KiB is the safe floor. local function max_content(mod) local ok, m = pcall(require, mod) if ok and type(m) == "table" then local n = tonumber(m.HTTP_MAX_CONTENT) if n and n > 0 then return math.floor(n) end end return nil end local maxBody = max_content("luci.http.protocol") or max_content("luci.http") or 8192 %>
<%+footer%>