Merge branch 'main-v4.3' into using-erlang-system-time
This commit is contained in:
commit
ced06efab2
|
@ -17,6 +17,7 @@ File format:
|
|||
- Fix rule-engine update behaviour which may initialize actions for disabled rules. [#8849](https://github.com/emqx/emqx/pull/8849)
|
||||
- Fix JWT plugin don't support non-integer timestamp claims. [#8862](https://github.com/emqx/emqx/pull/8862)
|
||||
- Fix delayed publish inaccurate caused by os time change. [#8908](https://github.com/emqx/emqx/pull/8908)
|
||||
- Fix dashboard binding IP address not working. [#8916](https://github.com/emqx/emqx/pull/8916)
|
||||
|
||||
|
||||
## v4.3.19
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
]}.
|
||||
|
||||
{mapping, "dashboard.listener.http", "emqx_dashboard.listeners", [
|
||||
{datatype, integer}
|
||||
{datatype, [integer, ip]}
|
||||
]}.
|
||||
|
||||
{mapping, "dashboard.listener.http.acceptors", "emqx_dashboard.listeners", [
|
||||
|
@ -39,7 +39,7 @@
|
|||
]}.
|
||||
|
||||
{mapping, "dashboard.listener.https", "emqx_dashboard.listeners", [
|
||||
{datatype, integer}
|
||||
{datatype, [integer, ip]}
|
||||
]}.
|
||||
|
||||
{mapping, "dashboard.listener.https.acceptors", "emqx_dashboard.listeners", [
|
||||
|
|
|
@ -54,7 +54,8 @@ start_listener({Proto, Port, Options}) when Proto == https ->
|
|||
{"/api/v4/[...]", minirest, http_handlers()}],
|
||||
minirest:start_https(listener_name(Proto), ranch_opts(Port, Options), Dispatch).
|
||||
|
||||
ranch_opts(Port, Options0) ->
|
||||
ranch_opts(Bind, Options0) ->
|
||||
IpPort = ip_port(Bind),
|
||||
NumAcceptors = get_value(num_acceptors, Options0, 4),
|
||||
MaxConnections = get_value(max_connections, Options0, 512),
|
||||
Options = lists:foldl(fun({K, _V}, Acc) when K =:= max_connections orelse K =:= num_acceptors ->
|
||||
|
@ -68,7 +69,13 @@ ranch_opts(Port, Options0) ->
|
|||
end, [], Options0),
|
||||
#{num_acceptors => NumAcceptors,
|
||||
max_connections => MaxConnections,
|
||||
socket_opts => [{port, Port} | Options]}.
|
||||
socket_opts => IpPort ++ Options}.
|
||||
|
||||
ip_port({IpStr, Port}) ->
|
||||
{ok, Ip} = inet:parse_address(IpStr),
|
||||
[{ip, Ip}, {port, Port}];
|
||||
ip_port(Port) when is_integer(Port) ->
|
||||
[{port, Port}].
|
||||
|
||||
stop_listeners() ->
|
||||
lists:foreach(fun(Listener) -> stop_listener(Listener) end, listeners()).
|
||||
|
|
|
@ -326,7 +326,12 @@ setup_node(Node, Apps) ->
|
|||
application:set_env(emqx_management, listeners, []),
|
||||
ok;
|
||||
(emqx_dashboard) ->
|
||||
application:set_env(emqx_dashboard, listeners, []),
|
||||
Options = [{http,{"127.0.0.1",18184},
|
||||
[{num_acceptors,4},
|
||||
{max_connections,512},
|
||||
{inet6,false},
|
||||
{ipv6_v6only,false}]}],
|
||||
application:set_env(emqx_dashboard, listeners, Options),
|
||||
ok;
|
||||
(_) ->
|
||||
ok
|
||||
|
|
Loading…
Reference in New Issue