From fdaac9800c314bcff728be8fc345ac4e452a41ba Mon Sep 17 00:00:00 2001 From: JianBo He Date: Sat, 10 Jun 2023 13:04:24 +0800 Subject: [PATCH] fix(authn): fix the hardcode method in trace logs --- apps/emqx_authn/src/simple_authn/emqx_authn_http.erl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/emqx_authn/src/simple_authn/emqx_authn_http.erl b/apps/emqx_authn/src/simple_authn/emqx_authn_http.erl index 421af074e..f20632414 100644 --- a/apps/emqx_authn/src/simple_authn/emqx_authn_http.erl +++ b/apps/emqx_authn/src/simple_authn/emqx_authn_http.erl @@ -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,