Merge pull request #11005 from HJianBo/fix-tracing-logs-typos
fix(authn): fix the hardcode method in trace logs
This commit is contained in:
commit
aea3ae4024
|
@ -435,19 +435,19 @@ parse_body(ContentType, _) ->
|
|||
uri_encode(T) ->
|
||||
emqx_http_lib:uri_encode(to_list(T)).
|
||||
|
||||
request_for_log(Credential, #{url := Url} = State) ->
|
||||
request_for_log(Credential, #{url := Url, method := Method} = State) ->
|
||||
SafeCredential = emqx_authn_utils:without_password(Credential),
|
||||
case generate_request(SafeCredential, State) of
|
||||
{PathQuery, Headers} ->
|
||||
#{
|
||||
method => post,
|
||||
method => Method,
|
||||
base_url => Url,
|
||||
path_query => PathQuery,
|
||||
headers => Headers
|
||||
};
|
||||
{PathQuery, Headers, Body} ->
|
||||
#{
|
||||
method => post,
|
||||
method => Method,
|
||||
base_url => Url,
|
||||
path_query => PathQuery,
|
||||
headers => Headers,
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
Fix the issue where the `method` field cannot be correctly printed in the trace logs of AuthN HTTP.
|
Loading…
Reference in New Issue