fix(http): force enable ssl when https
This commit is contained in:
parent
fa85c3061b
commit
a6357d92f8
|
@ -205,7 +205,9 @@ on_start(
|
||||||
http ->
|
http ->
|
||||||
{tcp, []};
|
{tcp, []};
|
||||||
https ->
|
https ->
|
||||||
SSLOpts = emqx_tls_lib:to_client_opts(maps:get(ssl, Config)),
|
SSLConf = maps:get(ssl, Config),
|
||||||
|
%% force enable ssl
|
||||||
|
SSLOpts = emqx_tls_lib:to_client_opts(SSLConf#{enable => true}),
|
||||||
{tls, SSLOpts}
|
{tls, SSLOpts}
|
||||||
end,
|
end,
|
||||||
NTransportOpts = emqx_utils:ipv6_probe(TransportOpts),
|
NTransportOpts = emqx_utils:ipv6_probe(TransportOpts),
|
||||||
|
|
|
@ -150,7 +150,8 @@ tr_handler_conf(#{logs := LogsConf, exporter := ExporterConf}) ->
|
||||||
ssl_opts(Endpoint, SSLOpts) ->
|
ssl_opts(Endpoint, SSLOpts) ->
|
||||||
case is_ssl(Endpoint) of
|
case is_ssl(Endpoint) of
|
||||||
true ->
|
true ->
|
||||||
emqx_tls_lib:to_client_opts(SSLOpts);
|
%% force enable ssl
|
||||||
|
emqx_tls_lib:to_client_opts(SSLOpts#{enable => true});
|
||||||
false ->
|
false ->
|
||||||
[]
|
[]
|
||||||
end.
|
end.
|
||||||
|
|
Loading…
Reference in New Issue