aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorHolger Weiss <holger@zedat.fu-berlin.de>2018-01-03 22:33:18 +0100
committerHolger Weiss <holger@zedat.fu-berlin.de>2018-01-03 22:33:18 +0100
commitdbbe3a9e62873e7963a208c271ccd79a45c63c78 (patch)
tree096cad35b6c8e4b4f9b2435d0824e47eb919e366 /src
parentMake mysql and pgsql one of the default module for Mix (diff)
parentmod_proxy65: Expand @HOST@ keyword in 'hostname' option (diff)
Merge remote-tracking branch 'processone/pr/2203'
* processone/pr/2203: mod_proxy65: Expand @HOST@ keyword in 'hostname' option
Diffstat (limited to 'src')
-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 fb34ba554..721ebabe3 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,