From d48cf6b72255f158913e6cce5325fcafb90f7caf Mon Sep 17 00:00:00 2001 From: Thibault Junin Date: Tue, 11 Feb 2025 13:43:40 +0100 Subject: [PATCH] Add `Webhook` Event `header` (#996) * Add Webhook Event header --- app/Jobs/ProcessWebhook.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/Jobs/ProcessWebhook.php b/app/Jobs/ProcessWebhook.php index 09bada2cc..cf2485e84 100644 --- a/app/Jobs/ProcessWebhook.php +++ b/app/Jobs/ProcessWebhook.php @@ -23,7 +23,9 @@ class ProcessWebhook implements ShouldQueue public function handle(): void { try { - Http::post($this->webhookConfiguration->endpoint, $this->data)->throw(); + Http::withHeader('X-Webhook-Event', $this->eventName) + ->post($this->webhookConfiguration->endpoint, $this->data) + ->throw(); $successful = now(); } catch (\Exception) { $successful = null;