aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_http.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2022-02-04 20:11:18 +0100
committerKim Alvefur <zash@zash.se>2022-02-04 20:11:18 +0100
commiteae775bc79c9c2a771212eedcdd7389b993078f0 (patch)
treef1c366dd159bb8ac559759e0d2a8872d405aca6f /plugins/mod_http.lua
parent35e77293c0e2e0aecb8931bf4900cdccd20abcfe (diff)
downloadprosody-eae775bc79c9c2a771212eedcdd7389b993078f0.tar.gz
prosody-eae775bc79c9c2a771212eedcdd7389b993078f0.zip
mod_http: Use interface name as default default global hostname
http://[::]:5280/ is as sensible as http://*:5280/ so why not This might be a bit weird when listening no multiple interfaces but not sure we can really do anything sensible then anyway.
Diffstat (limited to 'plugins/mod_http.lua')
-rw-r--r--plugins/mod_http.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/mod_http.lua b/plugins/mod_http.lua
index 9144ff49..a31418cf 100644
--- a/plugins/mod_http.lua
+++ b/plugins/mod_http.lua
@@ -95,7 +95,7 @@ function moduleapi.http_url(module, app_name, default_path)
local url = {
scheme = service[1].service.name;
host = module:get_option_string("http_host", module.global
- and module:get_option_string("http_default_host") or module.host);
+ and module:get_option_string("http_default_host", interface) or module.host);
port = port;
path = get_base_path(module, app_name, default_path or "/" .. app_name);
}