-
Notifications
You must be signed in to change notification settings - Fork 12
Open
Labels
area: headersIssues related to headers.Issues related to headers.enhancementNew feature or requestNew feature or request
Milestone
Description
Description
This issue tracks an enhancement to improve the AccessControlAllowHeadersHeader.headers constructor by adding canonicalization and validation logic.
Current Behavior
The constructor currently performs basic validation with assertions but doesn't normalize the input headers.
Proposed Enhancement
Apply canonicalization in the constructor to:
- Trim whitespace from header names
- Normalize case (e.g., lowercase)
- Remove duplicates
- Validate after normalization (assert non-empty, reject wildcards)
This would make the constructor more robust and consistent in handling various input formats.
Context
This enhancement was suggested during code review but deferred to maintain PR focus.
Requested by: @nielsenko
Original discussion: #146 (comment)
Related PR: #146
Benefits
- More robust input handling
- Consistent header name formatting
- Better validation logic
- Improved user experience when constructing headers
Metadata
Metadata
Assignees
Labels
area: headersIssues related to headers.Issues related to headers.enhancementNew feature or requestNew feature or request
Type
Projects
Status
Backlog 🗂️