Comparison

mod_http_debug/mod_http_debug.lua @ 5492:b6af4d1ff8c1

mod_http_debug: Handle any path under /debug/* as well Sometimes things encode useful info in paths. Could also help if you add path components in a reverse proxy.
author Kim Alvefur <zash@zash.se>
date Fri, 26 May 2023 15:38:38 +0200
parent 5491:7842502c1157
comparison
equal deleted inserted replaced
5491:7842502c1157 5492:b6af4d1ff8c1
24 24
25 local methods = module:get_option_set("http_debug_methods", { "GET"; "HEAD"; "DELETE"; "OPTIONS"; "PATCH"; "POST"; "PUT" }); 25 local methods = module:get_option_set("http_debug_methods", { "GET"; "HEAD"; "DELETE"; "OPTIONS"; "PATCH"; "POST"; "PUT" });
26 local route = {}; 26 local route = {};
27 for method in methods do 27 for method in methods do
28 route[method] = handle_request; 28 route[method] = handle_request;
29 route[method .. " /*"] = handle_request;
29 end 30 end
30 31
31 module:provides("http", { 32 module:provides("http", {
32 route = route; 33 route = route;
33 }) 34 })