changeset 5265 | cc2aed452a62 |
parent 5264 | 700ff21a0451 |
child 5268 | 69964d1cbe66 |
--- a/plugins/mod_http_files.lua Fri Dec 21 20:34:40 2012 +0100 +++ b/plugins/mod_http_files.lua Fri Dec 21 20:40:29 2012 +0100 @@ -126,6 +126,14 @@ return serve_file; end +function wrap_route(routes) + for route,handler in pairs(routes) do + if type(handler) == "table" and handler.path then + routes[route] = serve(handler); + end + end + return routes; +end if base_path then module:provides("http", {