Skip to content

fix: normalize allowlist headers when building the allowlist map#6481

Merged
javiermolinar merged 2 commits intomainfrom
fix-normalize-headers
Feb 17, 2026
Merged

fix: normalize allowlist headers when building the allowlist map#6481
javiermolinar merged 2 commits intomainfrom
fix-normalize-headers

Conversation

@javiermolinar
Copy link
Copy Markdown
Contributor

@javiermolinar javiermolinar commented Feb 17, 2026

What this PR does:
The async_strip_headers_middleware was case-sensitive. Meaning that an allowlist value like x-plugin-id can fail against X-Plugin-Id.

In this PR we first normalize the headers using http.CanonicalHeaderKey when the allowlist is build and normalize again when matching them against the list.

Which issue(s) this PR fixes:
Fixes #

Checklist

  • Tests updated
  • Documentation added
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]

Comment thread modules/frontend/pipeline/async_strip_headers_middleware.go
Comment thread modules/frontend/pipeline/async_strip_headers_middleware.go
Comment thread modules/frontend/pipeline/async_strip_headers_middleware_test.go
Copy link
Copy Markdown
Member

@electron0zero electron0zero left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

few nits, and can use one more test case. rest lgtm.

@javiermolinar javiermolinar merged commit e1365cc into main Feb 17, 2026
23 checks passed
@javiermolinar javiermolinar deleted the fix-normalize-headers branch February 17, 2026 16:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants