Merge pull request #8005 from thalesmg/fix-mgmt-listener-port
fix(mgmt): allow binding to specific interface
This commit is contained in:
commit
b97f7fa8fc
|
@ -227,6 +227,13 @@ end}.
|
||||||
Prefix = "management.listener." ++ atom_to_list(Proto),
|
Prefix = "management.listener." ++ atom_to_list(Proto),
|
||||||
case cuttlefish:conf_get(Prefix, Conf, undefined) of
|
case cuttlefish:conf_get(Prefix, Conf, undefined) of
|
||||||
undefined -> Acc;
|
undefined -> Acc;
|
||||||
|
{IPStr, Port} ->
|
||||||
|
{ok, IP} = inet:parse_address(IPStr),
|
||||||
|
[{Proto, Port, [{ip, IP}] ++ TcpOpts(Prefix) ++ Opts(Prefix)
|
||||||
|
++ case Proto of
|
||||||
|
http -> [];
|
||||||
|
https -> SslOpts(Prefix)
|
||||||
|
end} | Acc];
|
||||||
Port ->
|
Port ->
|
||||||
[{Proto, Port, TcpOpts(Prefix) ++ Opts(Prefix)
|
[{Proto, Port, TcpOpts(Prefix) ++ Opts(Prefix)
|
||||||
++ case Proto of
|
++ case Proto of
|
||||||
|
@ -236,4 +243,3 @@ end}.
|
||||||
end
|
end
|
||||||
end, [], [http, https])
|
end, [], [http, https])
|
||||||
end}.
|
end}.
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue