summaryrefslogtreecommitdiff
path: root/src/mod_proxy65_service.erl
diff options
context:
space:
mode:
authorMarc Schink <ejabberd-dev@marcschink.de>2018-01-03 17:16:23 +0100
committerMarc Schink <ejabberd-dev@marcschink.de>2018-01-03 22:31:06 +0100
commit264add87fa1f8e84f3a9eb237a1a5ecd5209aa6c (patch)
tree096cad35b6c8e4b4f9b2435d0824e47eb919e366 /src/mod_proxy65_service.erl
parentMake mysql and pgsql one of the default module for Mix (diff)
mod_proxy65: Expand @HOST@ keyword in 'hostname' option
Diffstat (limited to 'src/mod_proxy65_service.erl')
-rw-r--r--src/mod_proxy65_service.erl3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mod_proxy65_service.erl b/src/mod_proxy65_service.erl
index fb34ba55..721ebabe 100644
--- a/src/mod_proxy65_service.erl
+++ b/src/mod_proxy65_service.erl
@@ -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,