Skip to content

feat: add HandlerAction::response_headers_mut()#36

Merged
alukach merged 1 commit into
refactor/simplify-cf-workersfrom
refactor/handler-action-headers
May 21, 2026
Merged

feat: add HandlerAction::response_headers_mut()#36
alukach merged 1 commit into
refactor/simplify-cf-workersfrom
refactor/handler-action-headers

Conversation

@alukach
Copy link
Copy Markdown
Member

@alukach alukach commented Apr 16, 2026

Summary

  • Adds response_headers_mut() method to HandlerAction returning Option<&mut HeaderMap>
  • Returns Some for Response and Forward variants, None for NeedsBody
  • Eliminates the need to match on all three variants when adding response headers in middleware

Test plan

  • cargo test -p multistore — 62 tests pass including 3 new tests for the method

🤖 Generated with Claude Code

…injection

Middleware that adds response headers (CORS, Server-Timing, etc.) no
longer needs to match on all three HandlerAction variants manually.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@github-actions github-actions Bot added the feat label Apr 16, 2026
@alukach alukach merged commit 6e8e29e into refactor/simplify-cf-workers May 21, 2026
8 of 12 checks passed
@alukach alukach deleted the refactor/handler-action-headers branch May 21, 2026 05:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant