Skip to content
Permalink
Browse files

Fix the issue with missing SSL configuration

  • Loading branch information
tigercl committed Sep 16, 2019
1 parent 3b02e7b commit 272a42b5ac7b28f52e5e71fae540e47278fac9d5
Showing with 9 additions and 4 deletions.
  1. +9 −4 src/emqx_dashboard.erl
@@ -46,12 +46,17 @@ start_listener({Proto, Port, Options}) when Proto == https ->
{"/api/v3/[...]", minirest, http_handlers()}],
minirest:start_https(listener_name(Proto), ranch_opts(Port, Options), Dispatch).

ranch_opts(Port, Options) ->
NumAcceptors = get_value(num_acceptors, Options, 4),
MaxConnections = get_value(max_connections, Options, 512),
ranch_opts(Port, Options0) ->
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->
Acc;
({K, V}, Acc)->
[{K, V} | Acc]
end, [], Options0),
#{num_acceptors => NumAcceptors,
max_connections => MaxConnections,
socket_opts => [{port, Port}]}.
socket_opts => [{port, Port} | Options]}.

stop_listeners() ->
lists:foreach(fun(Listener) -> stop_listener(Listener) end, listeners()).

0 comments on commit 272a42b

Please sign in to comment.
You can’t perform that action at this time.