Skip to content

Add canonicalization to AccessControlAllowHeadersHeader constructor #149

Open

Description

@coderabbitai

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

Activity

  1. added
    enhancement
    on Sep 11, 2025
  2. moved this from Inbox 📫 to Backlog 🗂️ in Serverpod Frameworkson Sep 11, 2025
  3. added
    area: headers
    on Sep 11, 2025
  4. added this to the 1.0 Release milestone on Sep 11, 2025
  5. changed the title [-]Enhancement: Add canonicalization to AccessControlAllowHeadersHeader constructor[/-] [+]Add canonicalization to AccessControlAllowHeadersHeader constructor[/+] on Nov 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: headersenhancement

    Type

    No type

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions