Diff

mod_prometheus/mod_prometheus.lua @ 3952:343dc9dd70dd

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.
author Kim Alvefur <zash@zash.se>
date Sat, 21 Mar 2020 18:05:22 +0100
parent 3149:ccbfe7df02dc
child 4542:fb4a50bf60f1
line wrap: on
line diff
--- 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 = {