# HG changeset patch # User Kim Alvefur # Date 1584810322 -3600 # Node ID 343dc9dd70dd83c04995d1743df052ad97b89867 # Parent 32d9d155a9b9b5b403c241471e7194d022721a69 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. diff -r 32d9d155a9b9 -r 343dc9dd70dd mod_prometheus/mod_prometheus.lua --- 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 = {