1 package.path = "/usr/lib/lua/?.lua;/usr/lib/lua/?/init.lua;" .. package.path
2 package.cpath = "/usr/lib/lua/?.so;" .. package.cpath
3 module("webuci", package.seeall)
5 function prepare_req(uri)
8 require("ffluci.menu").get()
11 function init_req(context)
12 env.SERVER_PROTOCOL = context.server_proto
13 env.REMOTE_ADDR = context.remote_addr
14 env.REQUEST_METHOD = context.request_method
15 env.PATH_INFO = "/" .. context.uri
16 env.REMOTE_PORT = context.remote_port
17 env.SERVER_ADDR = context.server_addr
18 env.SCRIPT_NAME = env.REQUEST_URI:sub(1, #env.REQUEST_URI - #env.PATH_INFO)
21 function handle_req(context)
22 require("ffluci.dispatcher").httpdispatch()