diff options
author | Kim Alvefur <zash@zash.se> | 2015-03-23 18:45:02 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2015-03-23 18:45:02 +0100 |
commit | 0a0798236bef6bd0979746e69a528c8328f80b37 (patch) | |
tree | 925b7ae3ae69d1939e0b9a979eaf9192401d04c9 /plugins/mod_http.lua | |
parent | 1f538b0bb44b33bab00ce6a35e722d0fdec82a6a (diff) | |
download | prosody-0a0798236bef6bd0979746e69a528c8328f80b37.tar.gz prosody-0a0798236bef6bd0979746e69a528c8328f80b37.zip |
mod_http: Return a static string from module:http_url() when no ports are enabled and log a warning
Diffstat (limited to 'plugins/mod_http.lua')
-rw-r--r-- | plugins/mod_http.lua | 2 |
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) |