summaryrefslogtreecommitdiff
path: root/uhttpd.h
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2018-08-23 07:51:56 +0200
committerJo-Philipp Wich <jo@mein.io>2018-08-23 08:21:02 +0200
commitb741dec35698a80266fb8206970638e666774a33 (patch)
tree1ffdb47ec323b480451ba1f52d6c38376c631cff /uhttpd.h
parent952bf9d754d021ee9c08f9add5c9af53aaaf39ae (diff)
lua: support multiple Lua prefixes
Allow -l / -L arguments to be repeated to register multiple Lua prefix handlers in the same process. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'uhttpd.h')
-rw-r--r--uhttpd.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/uhttpd.h b/uhttpd.h
index 8d6022a..f77718e 100644
--- a/uhttpd.h
+++ b/uhttpd.h
@@ -52,6 +52,13 @@ struct alias {
char *path;
};
+struct lua_prefix {
+ struct list_head list;
+ const char *handler;
+ const char *prefix;
+ void *ctx;
+};
+
struct config {
const char *docroot;
const char *realm;
@@ -60,8 +67,6 @@ struct config {
const char *cgi_prefix;
const char *cgi_docroot_path;
const char *cgi_path;
- const char *lua_handler;
- const char *lua_prefix;
const char *ubus_prefix;
const char *ubus_socket;
int no_symlinks;
@@ -78,6 +83,7 @@ struct config {
int ubus_cors;
int cgi_prefix_len;
struct list_head cgi_alias;
+ struct list_head lua_prefix;
};
struct auth_realm {