mirror of
https://github.com/processone/ejabberd.git
synced 2025-01-03 18:02:28 +01:00
mod_proxy65: Expand @HOST@ keyword in 'hostname' option
This commit is contained in:
parent
1fcb6d7f36
commit
264add87fa
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user