fix(gw): fix bad listners field on http response
This commit is contained in:
parent
990514a048
commit
2411c22b42
|
@ -275,7 +275,7 @@ ret_gw(GwName, {ok, #{raw_config := GwConf}}) ->
|
||||||
end, maps:to_list(SubConf)),
|
end, maps:to_list(SubConf)),
|
||||||
[NLConfs | Acc]
|
[NLConfs | Acc]
|
||||||
end, [], maps:to_list(LsConf)),
|
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_gw(_GwName, Err) -> Err.
|
||||||
|
|
||||||
ret_authn(GwName, {ok, #{raw_config := GwConf}}) ->
|
ret_authn(GwName, {ok, #{raw_config := GwConf}}) ->
|
||||||
|
|
|
@ -69,7 +69,7 @@ set_special_cfg(emqx_gateway) ->
|
||||||
emqx_config:put(
|
emqx_config:put(
|
||||||
[gateway, exproto],
|
[gateway, exproto],
|
||||||
#{server => #{bind => 9100},
|
#{server => #{bind => 9100},
|
||||||
handler => #{address => "127.0.0.1:9001"},
|
handler => #{address => "http://127.0.0.1:9001"},
|
||||||
listeners => listener_confs(LisType)
|
listeners => listener_confs(LisType)
|
||||||
});
|
});
|
||||||
set_special_cfg(_App) ->
|
set_special_cfg(_App) ->
|
||||||
|
|
|
@ -172,7 +172,7 @@ t_gateway_exproto(_) ->
|
||||||
%% post
|
%% post
|
||||||
GwConf = #{name => <<"exproto">>,
|
GwConf = #{name => <<"exproto">>,
|
||||||
server => #{bind => <<"9100">>},
|
server => #{bind => <<"9100">>},
|
||||||
handler => #{address => <<"127.0.0.1:9001">>},
|
handler => #{address => <<"http://127.0.0.1:9001">>},
|
||||||
listeners => [
|
listeners => [
|
||||||
#{name => <<"def">>, type => <<"tcp">>, bind => <<"7993">>}
|
#{name => <<"def">>, type => <<"tcp">>, bind => <<"7993">>}
|
||||||
]
|
]
|
||||||
|
|
Loading…
Reference in New Issue