Skip to content

Fix Slack signature verification by excluding routes from global JSON parser - #370

Merged
bokelley merged 1 commit into
mainfrom
bokelley/fix-slack-body-capture
Dec 27, 2025
Merged

bokelley merged 1 commit into
mainfrom
bokelley/fix-slack-body-capture

Conversation

@bokelley

Copy link
Copy Markdown
Contributor

Summary

Fixed log spam "Raw body not captured for Slack signature verification" by preventing the global JSON parser from consuming request bodies before Slack route handlers could access them for signature verification.

Changes

Added /api/slack/commands and /api/slack/events to the middleware exclusion list (alongside /api/webhooks/stripe) so their route-specific parsers with verify callbacks can properly capture raw bodies for signature verification.

Testing

All tests pass, including schema validation and unit tests.

🤖 Generated with Claude Code

…l JSON parser

The global JSON parser was consuming the request body before Slack routes could
capture the raw body needed for signature verification. Added /api/slack/commands
and /api/slack/events to the exclusion list so their route-specific parsers with
verify callbacks can properly capture the raw body.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Haiku 4.5 <[email protected]>
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.

1 participant