Software /
code /
prosody
Changeset
6026:8a8be471ec72
mod_http: Fix http_external_url setting without an explicit port
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Wed, 26 Feb 2014 22:19:58 +0100 |
parents | 6025:583e5c1365fe |
children | 6027:8c69cea8a1bf 6029:dd3d4cfbd3cb |
files | plugins/mod_http.lua |
diffstat | 1 files changed, 3 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/mod_http.lua Thu Feb 20 19:08:55 2014 +0100 +++ b/plugins/mod_http.lua Wed Feb 26 22:19:58 2014 +0100 @@ -51,6 +51,9 @@ function moduleapi.http_url(module, app_name, default_path) app_name = app_name or (module.name:gsub("^http_", "")); local external_url = url_parse(module:get_option_string("http_external_url")) or {}; + if external_url.scheme and external_url.port == nil then + external_url.port = ports_by_scheme[external_url.scheme]; + end local services = portmanager.get_active_services(); local http_services = services:get("https") or services:get("http") or {}; for interface, ports in pairs(http_services) do