Mercurial > prosody-modules
changeset 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 |
parents | 32d9d155a9b9 |
children | 2c6d5734ae04 a411a8e028ed |
files | mod_prometheus/mod_prometheus.lua |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
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 = {