feat: implement custom headers for custom alerters#1399
Open
maxjb-xyz wants to merge 1 commit intomoghtech:mainfrom
Open
feat: implement custom headers for custom alerters#1399maxjb-xyz wants to merge 1 commit intomoghtech:mainfrom
maxjb-xyz wants to merge 1 commit intomoghtech:mainfrom
Conversation
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.
Summary
Adds custom request headers for Custom alerter endpoints and hardens the feature against two regressions found during review. Closes #1398
Changes
Added headers: Record<string, string> / HashMap<String, String> to CustomAlerterEndpoint
Updated custom alert delivery to interpolate header values the same way as the URL
Sanitized secrets in custom alerter non-2xx response bodies, not just request-send errors
Added backend tests covering:
URL + header interpolation
secret sanitization on request errors
secret sanitization in response bodies
Added UI support for editing custom headers in the alerter endpoint config
Blocked save when header text is invalid, including the confirm modal and keyboard save path
Notes
I also ran a UI build after installing dependencies, but the workspace currently has unrelated pre-existing TypeScript/module-resolution failures, so there was no clean end-to-end frontend build signal attributable to this change alone.