Add Webhook Event header (#996)

* Add Webhook Event header
This commit is contained in:
Thibault Junin 2025-02-11 13:43:40 +01:00 committed by GitHub
parent cba4cf11aa
commit d48cf6b722
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -23,7 +23,9 @@ class ProcessWebhook implements ShouldQueue
public function handle(): void public function handle(): void
{ {
try { 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(); $successful = now();
} catch (\Exception) { } catch (\Exception) {
$successful = null; $successful = null;