fix(gw): fix bad listners field on http response

This commit is contained in:
JianBo He 2021-12-30 19:00:28 +08:00
parent 990514a048
commit 2411c22b42
3 changed files with 3 additions and 3 deletions

View File

@ -275,7 +275,7 @@ ret_gw(GwName, {ok, #{raw_config := GwConf}}) ->
end, maps:to_list(SubConf)),
[NLConfs | Acc]
end, [], maps:to_list(LsConf)),
{ok, maps:merge(GwConf1, #{<<"listeners">> => NLsConf})};
{ok, maps:merge(GwConf1, #{<<"listeners">> => lists:append(NLsConf)})};
ret_gw(_GwName, Err) -> Err.
ret_authn(GwName, {ok, #{raw_config := GwConf}}) ->

View File

@ -69,7 +69,7 @@ set_special_cfg(emqx_gateway) ->
emqx_config:put(
[gateway, exproto],
#{server => #{bind => 9100},
handler => #{address => "127.0.0.1:9001"},
handler => #{address => "http://127.0.0.1:9001"},
listeners => listener_confs(LisType)
});
set_special_cfg(_App) ->

View File

@ -172,7 +172,7 @@ t_gateway_exproto(_) ->
%% post
GwConf = #{name => <<"exproto">>,
server => #{bind => <<"9100">>},
handler => #{address => <<"127.0.0.1:9001">>},
handler => #{address => <<"http://127.0.0.1:9001">>},
listeners => [
#{name => <<"def">>, type => <<"tcp">>, bind => <<"7993">>}
]