Merge pull request #9404 from JimMoen/fix-typo-50
fix(typo): typo in code
This commit is contained in:
commit
b879c935eb
|
@ -378,10 +378,14 @@ get_peer_info(Type, Listener, Req, Opts) ->
|
||||||
of
|
of
|
||||||
#{src_address := SrcAddr, src_port := SrcPort, ssl := SSL} ->
|
#{src_address := SrcAddr, src_port := SrcPort, ssl := SSL} ->
|
||||||
SourceName = {SrcAddr, SrcPort},
|
SourceName = {SrcAddr, SrcPort},
|
||||||
%% Notice: Only CN is available in Proxy Protocol V2 additional info
|
%% Notice: CN is only available in Proxy Protocol V2 additional info.
|
||||||
|
%% `CN` is unsupported in Proxy Protocol V1
|
||||||
|
%% `pp2_ssl_cn` is required by config `peer_cert_as_username` or `peer_cert_as_clientid`.
|
||||||
|
%% It will be parsed by esockd.
|
||||||
|
%% See also `emqx_channel:set_peercert_infos/3` and `esockd_peercert:common_name/1`
|
||||||
SourceSSL =
|
SourceSSL =
|
||||||
case maps:get(cn, SSL, undefined) of
|
case maps:get(cn, SSL, undefined) of
|
||||||
undeined -> nossl;
|
undefined -> undefined;
|
||||||
CN -> [{pp2_ssl_cn, CN}]
|
CN -> [{pp2_ssl_cn, CN}]
|
||||||
end,
|
end,
|
||||||
{SourceName, SourceSSL};
|
{SourceName, SourceSSL};
|
||||||
|
|
Loading…
Reference in New Issue