diff --git a/sdk/core/azure-core/CHANGELOG.md b/sdk/core/azure-core/CHANGELOG.md index f77fe1020e82..759a911cace5 100644 --- a/sdk/core/azure-core/CHANGELOG.md +++ b/sdk/core/azure-core/CHANGELOG.md @@ -1,5 +1,11 @@ # Release History +## 1.42.0 (Unreleased) + +### Features Added + +- Added `azure-deprecating` to the default allowed headers list in `HttpLoggingPolicy`, so deprecation notification headers are logged without redaction. + ## 1.41.0 (2026-05-07) ### Features Added diff --git a/sdk/core/azure-core/azure/core/pipeline/policies/_universal.py b/sdk/core/azure-core/azure/core/pipeline/policies/_universal.py index 9be81820904f..1e221ceb413c 100644 --- a/sdk/core/azure-core/azure/core/pipeline/policies/_universal.py +++ b/sdk/core/azure-core/azure/core/pipeline/policies/_universal.py @@ -438,6 +438,7 @@ class HttpLoggingPolicy( "WWW-Authenticate", # OAuth Challenge header. "x-vss-e2eid", # Needed by Azure DevOps pipelines. "x-msedge-ref", # Needed by Azure DevOps pipelines. + "azure-deprecating", # Deprecation notification header. ] ) REDACTED_PLACEHOLDER: str = "REDACTED" diff --git a/sdk/core/azure-core/tests/test_pipeline.py b/sdk/core/azure-core/tests/test_pipeline.py index af6ca1a1a0ea..8262a70827f9 100644 --- a/sdk/core/azure-core/tests/test_pipeline.py +++ b/sdk/core/azure-core/tests/test_pipeline.py @@ -73,6 +73,7 @@ def test_default_http_logging_policy(http_request): assert "WWW-Authenticate" in http_logging_policy.allowed_header_names assert "x-vss-e2eid" in http_logging_policy.allowed_header_names assert "x-msedge-ref" in http_logging_policy.allowed_header_names + assert "azure-deprecating" in http_logging_policy.allowed_header_names # Testing I can replace the set entirely HttpLoggingPolicy.DEFAULT_HEADERS_ALLOWLIST = set(HttpLoggingPolicy.DEFAULT_HEADERS_ALLOWLIST) HttpLoggingPolicy.DEFAULT_HEADERS_WHITELIST = set(HttpLoggingPolicy.DEFAULT_HEADERS_ALLOWLIST)