fix(emqx_auth_http): make configure backward compatible
This commit is contained in:
parent
85b0ce3843
commit
6cd79f92e0
|
@ -139,7 +139,7 @@ auth.http.pool_size = 32
|
|||
## Whether to enable HTTP Pipelining
|
||||
##
|
||||
## See: https://en.wikipedia.org/wiki/HTTP_pipelining
|
||||
auth.http.enable_pipelining = true
|
||||
auth.http.enable_pipelining = 100
|
||||
|
||||
##------------------------------------------------------------------------------
|
||||
## SSL options
|
||||
|
|
|
@ -110,10 +110,29 @@ end}.
|
|||
]}.
|
||||
|
||||
{mapping, "auth.http.enable_pipelining", "emqx_auth_http.enable_pipelining", [
|
||||
{default, 100},
|
||||
{datatype, integer}
|
||||
{default, "100"},
|
||||
{datatype, string}
|
||||
]}.
|
||||
|
||||
{translation, "emqx_auth_http.enable_pipelining", fun(Conf) ->
|
||||
case cuttlefish:conf_get("auth.http.enable_pipelining", Conf, undefined) of
|
||||
undefined -> 100;
|
||||
Str ->
|
||||
try
|
||||
erlang:list_to_integer(Str)
|
||||
catch _:_ ->
|
||||
case erlang:list_to_atom(Str) of
|
||||
true ->
|
||||
100;
|
||||
false ->
|
||||
1;
|
||||
_ ->
|
||||
100
|
||||
end
|
||||
end
|
||||
end
|
||||
end}.
|
||||
|
||||
{mapping, "auth.http.ssl.cacertfile", "emqx_auth_http.cacertfile", [
|
||||
{datatype, string}
|
||||
]}.
|
||||
|
|
Loading…
Reference in New Issue