feat(monitors): add request headers to HTTP monitors - #3892
Open
eralpozcan wants to merge 1 commit into
Open
Conversation
Adds an optional list of key/value request headers to HTTP monitors, sent with every check. Header names are validated as RFC 9110 tokens and values as printable ASCII, so malformed headers are rejected in the form and by the API instead of failing at request time and reporting the monitor as down. Connection-level headers managed by the HTTP client (host, content-length, transfer-encoding, connection, upgrade, keep-alive) and duplicate names (case-insensitive) are rejected as well. The existing `secret` field still owns the Authorization header and wins over a configured one. Fixes bluewave-labs#3755
eralpozcan
requested review from
Br0wnHammer,
ajhollid and
karenvicent
as code owners
August 27, 2026 19:49
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.
Describe your changes
Adds an optional list of key/value request headers to HTTP monitors. The configured headers are sent with every check, so endpoints behind an API key, a tenant header, a custom
User-Agent, etc. can be monitored.This picks up #3755, which was left unfinished when #3756 went inactive with review feedback still open. The work here is written against current
developand resolves the points that were still outstanding on that review:X-Api Keyor a value containing a newline would pass validation, get scheduled, fail at request time and report the monitor as down for no visible reason.host,content-length,transfer-encoding,connection,upgrade,keep-alive) are rejected for the same reason, as are duplicate header names (case-insensitive).form.getFieldState("headers", form.formState).error?.root, so the error object is not coerced withas.FormTextField/useFieldArraywith stablefield.idkeys, and stack vertically on small screens..gitignorechanges.The existing
secretfield still owns theAuthorizationheader — it is applied last and wins if a header of that name is also configured.Server-side,
headersis an optional subdocument array on the monitor, validated on create / edit / import and mapped back to plain pairs when reading.Screenshots
Desktop:
Small screen (fields stack):
Tests
13 new unit tests covering the validation rules (invalid names, invalid values, reserved names, duplicates, optional/default behaviour) and
HttpProviderheader assembly (configured headers, merge with the secret-derivedAuthorization, secret precedence, no headers at all). Full server suite: 1516 passing.Write your issue number after "Fixes "
Fixes #3755
Please ensure all items are checked off before requesting a review. "Checked off" means you need to add an "x" character between brackets so they turn into checkmarks.
<div>Add</div>, use):npm run formatin server and client directories, which automatically formats your code.