File tree Expand file tree Collapse file tree 2 files changed +16
-4
lines changed
src/main/java/com/azure/core/http/policy Expand file tree Collapse file tree 2 files changed +16
-4
lines changed Original file line number Diff line number Diff line change 1010
1111### Other Changes
1212
13+ - Added ` x-ms-request-id ` , ` MS-CV ` , ` WWW-Authenticate ` as default logged headers and ` api-version ` as a default logged
14+ query parameter.
15+
1316## 1.25.0 (2022-02-04)
1417
1518### Features Added
Original file line number Diff line number Diff line change 88import com .azure .core .util .logging .ClientLogger ;
99
1010import java .util .Arrays ;
11+ import java .util .Collections ;
1112import java .util .HashSet ;
1213import java .util .List ;
1314import java .util .Objects ;
@@ -32,10 +33,13 @@ public class HttpLogOptions {
3233 private static final String INVALID_APPLICATION_ID_LENGTH = "'applicationId' length cannot be greater than "
3334 + MAX_APPLICATION_ID_LENGTH ;
3435 private static final String INVALID_APPLICATION_ID_SPACE = "'applicationId' cannot contain spaces." ;
35- private static final List <String > DEFAULT_HEADERS_WHITELIST = Arrays .asList (
36+ private static final List <String > DEFAULT_HEADERS_ALLOWLIST = Arrays .asList (
37+ "x-ms-request-id" ,
3638 "x-ms-client-request-id" ,
3739 "x-ms-return-client-request-id" ,
3840 "traceparent" ,
41+ "MS-CV" ,
42+
3943 "Accept" ,
4044 "Cache-Control" ,
4145 "Connection" ,
@@ -54,16 +58,21 @@ public class HttpLogOptions {
5458 "Retry-After" ,
5559 "Server" ,
5660 "Transfer-Encoding" ,
57- "User-Agent"
61+ "User-Agent" ,
62+ "WWW-Authenticate"
63+ );
64+
65+ private static final List <String > DEFAULT_QUERY_PARAMS_ALLOWLIST = Collections .singletonList (
66+ "api-version"
5867 );
5968
6069 /**
6170 * Creates a new instance that does not log any information about HTTP requests or responses.
6271 */
6372 public HttpLogOptions () {
6473 logLevel = HttpLogDetailLevel .ENVIRONMENT_HTTP_LOG_DETAIL_LEVEL ;
65- allowedHeaderNames = new HashSet <>(DEFAULT_HEADERS_WHITELIST );
66- allowedQueryParamNames = new HashSet <>();
74+ allowedHeaderNames = new HashSet <>(DEFAULT_HEADERS_ALLOWLIST );
75+ allowedQueryParamNames = new HashSet <>(DEFAULT_QUERY_PARAMS_ALLOWLIST );
6776 applicationId = null ;
6877 }
6978
You can’t perform that action at this time.
0 commit comments