-
Notifications
You must be signed in to change notification settings - Fork 5.1k
[App Configuration] - Add query param policy #53137
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[App Configuration] - Add query param policy #53137
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds a new query parameter normalization pipeline policy to the Azure App Configuration SDK. The policy ensures query parameters are lowercase and sorted alphabetically to support Azure Front Door as a CDN.
- Implements a new
QueryParamPolicythat transforms query parameters to lowercase and sorts them alphabetically - Adds comprehensive test coverage for various query parameter scenarios including duplicates and encoded values
- Removes the unused
ApiVersionPolicyclass as part of cleanup
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
QueryParamPolicy.cs |
New pipeline policy that normalizes query parameters by converting to lowercase and sorting alphabetically |
QueryParamPolicyTests.cs |
Comprehensive test suite covering lowercase conversion, sorting, duplicate handling, and value preservation |
ConfigurationClient.cs |
Integration of the new QueryParamPolicy into the HTTP pipeline |
ApiVersionPolicy.cs |
Removal of unused ApiVersionPolicy class |
assets.json |
Version tag update for the changes |
sdk/appconfiguration/Azure.Data.AppConfiguration/src/QueryParamPolicy.cs
Outdated
Show resolved
Hide resolved
sdk/appconfiguration/Azure.Data.AppConfiguration/src/QueryParamPolicy.cs
Outdated
Show resolved
Hide resolved
sdk/appconfiguration/Azure.Data.AppConfiguration/src/QueryParamPolicy.cs
Outdated
Show resolved
Hide resolved
sdk/appconfiguration/Azure.Data.AppConfiguration/src/QueryParamPolicy.cs
Outdated
Show resolved
Hide resolved
sdk/appconfiguration/Azure.Data.AppConfiguration/src/QueryParamPolicy.cs
Outdated
Show resolved
Hide resolved
sdk/appconfiguration/Azure.Data.AppConfiguration/tests/QueryParamPolicyTests.cs
Show resolved
Hide resolved
…or-net into zhiyuanliang/query-param-policy
sdk/appconfiguration/Azure.Data.AppConfiguration/src/QueryParamPolicy.cs
Outdated
Show resolved
Hide resolved
sdk/appconfiguration/Azure.Data.AppConfiguration/src/QueryParamPolicy.cs
Outdated
Show resolved
Hide resolved
sdk/appconfiguration/Azure.Data.AppConfiguration/src/QueryParamPolicy.cs
Outdated
Show resolved
Hide resolved
sdk/appconfiguration/Azure.Data.AppConfiguration/src/QueryParamPolicy.cs
Outdated
Show resolved
Hide resolved
sdk/appconfiguration/Azure.Data.AppConfiguration/src/QueryParamPolicy.cs
Outdated
Show resolved
Hide resolved
sdk/appconfiguration/Azure.Data.AppConfiguration/src/QueryParamPolicy.cs
Outdated
Show resolved
Hide resolved
sdk/appconfiguration/Azure.Data.AppConfiguration/src/QueryParamPolicy.cs
Outdated
Show resolved
Hide resolved
sdk/appconfiguration/Azure.Data.AppConfiguration/src/QueryParamPolicy.cs
Outdated
Show resolved
Hide resolved
sdk/appconfiguration/Azure.Data.AppConfiguration/src/QueryParamPolicy.cs
Outdated
Show resolved
Hide resolved
|
I suggest putting a summary on the class that describes what it is for. |
* add query param policy * update * update * update * update * add test * catch UriFormatException * update * remove try-catch * add summary comment for pipeline policy
Why this PR?
Adds a new pipeline to update the query params to make sure they are all lowercase and in alphabetical order. This is required for support of Azure Front Door as a CDN.