mirror of
https://github.com/processone/ejabberd
synced 2025-10-03 17:59:31 +02:00
Remove some options keyword expansion, as they are now predefined
This commit is contained in:
parent
998690f58c
commit
c8abff33c1
3 changed files with 5 additions and 22 deletions
|
@ -546,14 +546,10 @@ sip_uri() ->
|
||||||
-spec host() -> yconf:validator(binary()).
|
-spec host() -> yconf:validator(binary()).
|
||||||
host() ->
|
host() ->
|
||||||
fun(Domain) ->
|
fun(Domain) ->
|
||||||
Host = ejabberd_config:get_myname(),
|
|
||||||
Hosts = ejabberd_config:get_option(hosts),
|
Hosts = ejabberd_config:get_option(hosts),
|
||||||
Domain1 = (binary())(Domain),
|
case lists:member(Domain, Hosts) of
|
||||||
Domain2 = misc:expand_keyword(<<"@HOST@">>, Domain1, Host),
|
true -> fail({route_conflict, Domain});
|
||||||
Domain3 = (domain())(Domain2),
|
false -> Domain
|
||||||
case lists:member(Domain3, Hosts) of
|
|
||||||
true -> fail({route_conflict, Domain3});
|
|
||||||
false -> Domain3
|
|
||||||
end
|
end
|
||||||
end.
|
end.
|
||||||
|
|
||||||
|
|
|
@ -932,12 +932,7 @@ listen_opt_type(default_host) ->
|
||||||
listen_opt_type(custom_headers) ->
|
listen_opt_type(custom_headers) ->
|
||||||
econf:map(
|
econf:map(
|
||||||
econf:binary(),
|
econf:binary(),
|
||||||
econf:and_then(
|
econf:binary()).
|
||||||
econf:binary(),
|
|
||||||
fun(V) ->
|
|
||||||
misc:expand_keyword(<<"@VERSION@">>, V,
|
|
||||||
ejabberd_option:version())
|
|
||||||
end)).
|
|
||||||
|
|
||||||
listen_options() ->
|
listen_options() ->
|
||||||
[{ciphers, undefined},
|
[{ciphers, undefined},
|
||||||
|
|
|
@ -112,14 +112,7 @@ opt_type(cache_missed) ->
|
||||||
opt_type(cache_size) ->
|
opt_type(cache_size) ->
|
||||||
econf:pos_int(infinity);
|
econf:pos_int(infinity);
|
||||||
opt_type(captcha_cmd) ->
|
opt_type(captcha_cmd) ->
|
||||||
econf:and_then(
|
econf:binary();
|
||||||
econf:binary(),
|
|
||||||
fun(V) ->
|
|
||||||
V2 = misc:expand_keyword(<<"@SEMVER@">>, V,
|
|
||||||
ejabberd_option:version()),
|
|
||||||
misc:expand_keyword(<<"@VERSION@">>, V2,
|
|
||||||
misc:semver_to_xxyy(ejabberd_option:version()))
|
|
||||||
end);
|
|
||||||
opt_type(captcha_host) ->
|
opt_type(captcha_host) ->
|
||||||
econf:binary();
|
econf:binary();
|
||||||
opt_type(captcha_limit) ->
|
opt_type(captcha_limit) ->
|
||||||
|
@ -493,7 +486,6 @@ opt_type(jwt_auth_only_rule) ->
|
||||||
{c2s_protocol_options, undefined | binary()} |
|
{c2s_protocol_options, undefined | binary()} |
|
||||||
{s2s_ciphers, undefined | binary()} |
|
{s2s_ciphers, undefined | binary()} |
|
||||||
{c2s_ciphers, undefined | binary()} |
|
{c2s_ciphers, undefined | binary()} |
|
||||||
{captcha_cmd, undefined | binary()} |
|
|
||||||
{websocket_origin, [binary()]} |
|
{websocket_origin, [binary()]} |
|
||||||
{disable_sasl_mechanisms, [binary()]} |
|
{disable_sasl_mechanisms, [binary()]} |
|
||||||
{s2s_zlib, boolean()} |
|
{s2s_zlib, boolean()} |
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue