Skip to content

Commit 2edd1dc

Browse files
authored
[core] allow logging of Accept-Encoding (Azure#15290)
Looking at the MDN doc about Accept-Encoding, it doesn't container sensitive information. "The Accept-Encoding request HTTP header advertises which content encoding, usually a compression algorithm, the client is able to understand." https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept-Encoding This PR adds it to the allowed header name list so its value is not sanitized in logging.
1 parent 4bd3842 commit 2edd1dc

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

sdk/core/core-http/src/util/sanitizer.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ const defaultAllowedHeaderNames = [
4343
"Origin",
4444

4545
"Accept",
46+
"Accept-Encoding",
4647
"Cache-Control",
4748
"Connection",
4849
"Content-Length",

sdk/core/core-rest-pipeline/src/util/sanitizer.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ const defaultAllowedHeaderNames = [
5151
"Origin",
5252

5353
"Accept",
54+
"Accept-Encoding",
5455
"Cache-Control",
5556
"Connection",
5657
"Content-Length",

0 commit comments

Comments
 (0)