Changeset

12269:a19d435dee90

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.
author Kim Alvefur <zash@zash.se>
date Fri, 04 Feb 2022 20:11:18 +0100
parents 12268:d41e8c7890b0
children 12270:c78639ee6ccb
files plugins/mod_http.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/mod_http.lua	Fri Feb 04 19:58:43 2022 +0100
+++ b/plugins/mod_http.lua	Fri Feb 04 20:11:18 2022 +0100
@@ -95,7 +95,7 @@
 			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);
 			}