25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-12-22 17:28:25 +01:00

Merge remote-tracking branch 'processone/pr/2203'

* processone/pr/2203:
  mod_proxy65: Expand @HOST@ keyword in 'hostname' option
This commit is contained in:
Holger Weiss 2018-01-03 22:33:18 +01:00
commit dbbe3a9e62

View File

@ -252,8 +252,9 @@ transform_module_options(Opts) ->
-spec get_streamhost(binary(), binary()) -> streamhost().
get_streamhost(Host, ServerHost) ->
{Port, IP} = get_port_ip(ServerHost),
HostName = gen_mod:get_module_opt(ServerHost, mod_proxy65, hostname,
HostName0 = gen_mod:get_module_opt(ServerHost, mod_proxy65, hostname,
misc:ip_to_list(IP)),
HostName = misc:expand_keyword(<<"@HOST@">>, HostName0, ServerHost),
Resource = ejabberd_cluster:node_id(),
#streamhost{jid = jid:make(<<"">>, Host, Resource),
host = HostName,