Skip to content

Forward selected webhook request headers to triggered DAG runs #2037

@krlmlr

Description

@krlmlr

Drafted with Claude, reviewed manually.

WebhookRawBodyMiddleware (#1668) makes the raw POST body reachable
inside DAG runs as WEBHOOK_PAYLOAD, but request headers are dropped
before the DAG sees the run.

Forwarding an allow-listed subset (e.g. via a per-DAG or base.yaml
forward_headers field) would unblock common webhook patterns:

Sketch on top of #1668:

  1. webhook_middleware.go — capture allow-listed headers into ctx
  2. webhooks.go::TriggerWebhook — append WEBHOOK_HEADERS=<json> to params
  3. api/v1/api.yaml — document the new param

Authorization should never be forwardable.

Discussion context:
https://discord.com/channels/1095289480774172772/1409891877288939560/1497580577325453373

Happy to put up a PR.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions