Comparison

plugins/mod_http.lua @ 12192:6a772a0c0dfd

mod_http: Increase severity of loading unreachable http modules This is either caused by an earlier failure to bind http/s ports, in which case that should be corrected, or explicitly disbling the http/s ports, in which case ... why enable http modules? Suggested by jonas’
author Kim Alvefur <zash@zash.se>
date Sat, 15 Jan 2022 17:37:07 +0100
parent 12191:8b57362f1176
child 12268:d41e8c7890b0
comparison
equal deleted inserted replaced
12191:8b57362f1176 12192:6a772a0c0dfd
224 end 224 end
225 local services = portmanager.get_active_services(); 225 local services = portmanager.get_active_services();
226 if services:get("https") or services:get("http") then 226 if services:get("https") or services:get("http") then
227 module:log("info", "Serving '%s' at %s", app_name, module:http_url(app_name, app_path)); 227 module:log("info", "Serving '%s' at %s", app_name, module:http_url(app_name, app_path));
228 elseif prosody.process_type == "prosody" then 228 elseif prosody.process_type == "prosody" then
229 module:log("warn", "Not listening on any ports, '%s' will be unreachable", app_name); 229 module:log("error", "Not listening on any ports, '%s' will be unreachable", app_name);
230 end 230 end
231 end 231 end
232 232
233 local function http_app_removed(event) 233 local function http_app_removed(event)
234 local app_handlers = apps[event.item.name]; 234 local app_handlers = apps[event.item.name];