mod_prometheus: Ensure mod_http is loaded where the http interface is exposed (thanks Martin)
Loading mod_http globally does not have the desired effect, it needs to
be loaded in the host context where module:provides is called.
--- a/mod_prometheus/mod_prometheus.lua Sat Mar 21 15:03:47 2020 +0100
+++ b/mod_prometheus/mod_prometheus.lua Sat Mar 21 18:05:22 2020 +0100
@@ -6,7 +6,6 @@
-- This module is MIT/X11 licensed.
module:set_global();
-module:depends "http";
local tostring = tostring;
local t_insert = table.insert;
@@ -140,6 +139,7 @@
end
function module.add_host(module)
+ module:depends "http";
module:provides("http", {
default_path = "metrics";
route = {