diff options
author | Felix Fietkau <nbd@openwrt.org> | 2015-11-08 11:41:42 +0100 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2015-11-08 11:45:29 +0100 |
commit | 25023c796a9a55cd7ec7ff364cd1229fab958679 (patch) | |
tree | 74e2f8fcd78e0a0d35a79dbd32781fb82531b9f4 /uhttpd.h | |
parent | d9513e62bf484eea8a9ca63c2bfac10f4bdb6c9f (diff) |
add support for handling redirects via a script
In a json_script file you can specify rules for rewriting the URL or
redirecting the browser either unconditionally, or as a fallback where
it would otherwise print a 404 error
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Diffstat (limited to 'uhttpd.h')
-rw-r--r-- | uhttpd.h | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -318,6 +318,11 @@ bool uh_create_process(struct client *cl, struct path_info *pi, char *url, int uh_plugin_init(const char *name); void uh_plugin_post_init(void); +int uh_handler_add(const char *file); +int uh_handler_run(struct client *cl, char **url, bool fallback); + +struct path_info *uh_path_lookup(struct client *cl, const char *url); + static inline void uh_client_ref(struct client *cl) { cl->refcount++; |