Store and show an event's query string, and pass it on to an HTTP target when set (closes #312)
check / check (push) Successful in 6m32s

The receiver keeps the query string of the request it received on the event, in a new `raw_query` column of the per-webhook `events` table; a resubmitted copy carries its original's. The event log and the event's page show it with the request, the event log leaving out one over 32 KiB as it does request headers. The archive and log targets carry it. An HTTP target gets a `forwardQuery` setting, off by default, on both target forms and in the target list: on, each delivery, replays and resubmits included, appends the query string to the target URL, joined with `&` to one it already has.

Model: opus-5-5
This commit is contained in:
2026-10-04 00:18:34 +00:00
parent a8fc0c5d32
commit ba19430b87
32 changed files with 537 additions and 69 deletions
+3 -1
View File
@@ -30,6 +30,7 @@ type resubmitSource struct {
ID string
EntrypointID string
Method string
RawQuery string
Headers string
ContentType string
Body []byte
@@ -39,7 +40,7 @@ type resubmitSource struct {
// The cast to blob is what makes the driver hand back the stored bytes
// rather than a string conversion, the same reason eventBodyQuery
// casts.
const resubmitColumns = "id, entrypoint_id, method, headers, " +
const resubmitColumns = "id, entrypoint_id, method, raw_query, headers, " +
"content_type, cast(body as blob) AS body"
// HandleEventResubmit re-injects a stored event as a new undelivered
@@ -193,6 +194,7 @@ func (h *Handlers) queueResubmit(
WebhookID: webhook.ID,
EntrypointID: src.EntrypointID,
Method: src.Method,
RawQuery: src.RawQuery,
HeadersJSON: src.Headers,
ContentType: src.ContentType,
Body: src.Body,