mod_http: Make module:http_url() aware of http_host

This commit is contained in:
Kim Alvefur 2012-11-22 20:40:06 +01:00
parent 731c5f5cb7
commit 12f09bf02b

View file

@ -55,7 +55,7 @@ function moduleapi.http_url(module, app_name, default_path)
for port, services in pairs(ports) do
local url = {
scheme = (external_url.scheme or services[1].service.name);
host = (external_url.host or module.host);
host = (external_url.host or module:get_option_string("http_host", module.host));
port = tonumber(external_url.port) or port or 80;
path = normalize_path(external_url.path or "/")..
(get_base_path(module, app_name, default_path or "/"..app_name):sub(2));