diff options
Diffstat (limited to 'core/contrib')
-rw-r--r-- | core/contrib/webuci_bootstrap.lua | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/core/contrib/webuci_bootstrap.lua b/core/contrib/webuci_bootstrap.lua index 1733437075..fd4c47ab57 100644 --- a/core/contrib/webuci_bootstrap.lua +++ b/core/contrib/webuci_bootstrap.lua @@ -1,2 +1,22 @@ package.path = "/usr/lib/lua/?.lua;/usr/lib/lua/?/init.lua;" .. package.path package.cpath = "/usr/lib/lua/?.so;" .. package.cpath +module("webuci", package.seeall) + +function prepare_req(uri) + require("ffluci.menu").get() + REQUEST_URI = uri +end + +function init_req(context) + SERVER_PROTOCOL = context.server_proto + REMOTE_ADDR = context.remote_addr + REQUEST_METHOD = context.request_method + PATH_INFO = "/" .. context.uri + REMOTE_PORT = context.remote_port + SERVER_ADDR = context.server_addr + SCRIPT_NAME = REQUEST_URI:sub(1, #REQUEST_URI - #context.uri) +end + +function handle_req(context) + require("ffluci.dispatcher").httpdispatch() +end
\ No newline at end of file |