aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2015-03-23 18:45:02 +0100
committerKim Alvefur <zash@zash.se>2015-03-23 18:45:02 +0100
commit0e041ac943e80bece48ed5cb5788e201ca4de98a (patch)
tree925b7ae3ae69d1939e0b9a979eaf9192401d04c9 /plugins
parent84cdf3f61dc9aee854548da34929273d595bdba1 (diff)
downloadprosody-0e041ac943e80bece48ed5cb5788e201ca4de98a.tar.gz
prosody-0e041ac943e80bece48ed5cb5788e201ca4de98a.zip
mod_http: Return a static string from module:http_url() when no ports are enabled and log a warning
Diffstat (limited to 'plugins')
-rw-r--r--plugins/mod_http.lua2
1 files changed, 2 insertions, 0 deletions
diff --git a/plugins/mod_http.lua b/plugins/mod_http.lua
index 9ff3af74..9b574bc8 100644
--- a/plugins/mod_http.lua
+++ b/plugins/mod_http.lua
@@ -69,6 +69,8 @@ function moduleapi.http_url(module, app_name, default_path)
return url_build(url);
end
end
+ module:log("warn", "No http ports enabled, can't generate an external URL");
+ return "http://disabled.invalid/";
end
function module.add_host(module)