25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-22 16:20:52 +01:00

Fix validator of option ejabberd_service->hosts

Fixes #2929
This commit is contained in:
Evgeny Khramtsov 2019-07-06 10:38:25 +03:00
parent 61a58f6e67
commit 1663e78cf7

View File

@ -264,14 +264,12 @@ listen_opt_type(check_from) ->
listen_opt_type(password) ->
econf:binary();
listen_opt_type(hosts) ->
econf:and_then(
econf:map(
econf:domain(),
econf:and_then(
econf:options(
#{password => econf:binary()})),
fun({Host, Opts}) ->
{Host, proplists:get_value(password, Opts)}
end);
#{password => econf:binary()}),
fun(Opts) -> proplists:get_value(password, Opts) end));
listen_opt_type(global_routes) ->
econf:bool().