Add default Content-Type: application/json header for custom detector verification request#4947
Merged
MuneebUllahKhan222 merged 3 commits intoMay 5, 2026
Conversation
Contributor
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Reviewed by Cursor Bugbot for commit 50903f3. Configure here.
mcastorina
approved these changes
May 4, 2026
MuneebUllahKhan222
added a commit
that referenced
this pull request
May 29, 2026
… verification request (#4947) * added content-type=application/json as default header * improv: set content type header when it is not present in the config * handled canonicalization
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Description
Custom detector verification requests do not currently include a default
Content-Type: application/jsonheader, which can lead to compatibility issues and may require usingforce=trueas a workaround.This PR updates the custom detector verification flow to always include
Content-Type: application/jsonwhen making HTTP requests. Since verification requests consistently send JSON payloads, standardizing this behavior is safe and ensures more reliable integrations.Checklist:
make test-community)?make lintthis requires golangci-lint)?Note
Low Risk
Low risk change limited to outbound custom detector verification requests; it only adds a default header when one is not already provided, which could affect integrations that relied on an omitted Content-Type.
Overview
Custom detector webhook verification requests now default
Content-Typetoapplication/jsonwhen the user-specified verifier headers don’t set one.This standardizes verification POSTs (which send JSON bodies) and reduces the need for workarounds with endpoints that require an explicit content type.
Reviewed by Cursor Bugbot for commit ab5fc9a. Bugbot is set up for automated code reviews on this repo. Configure here.