onQueue('high'); } /** * Execute the job. */ public function handle(): void { $validator = Validator::make( ['webhook_url' => $this->webhookUrl], ['webhook_url' => ['required', 'url', new SafeWebhookUrl]] ); if ($validator->fails()) { Log::warning('SendWebhookJob: blocked unsafe webhook URL', [ 'url' => SafeWebhookUrl::redactedUrlForLog($this->webhookUrl), 'errors' => $validator->errors()->all(), ]); return; } try { $httpOptions = SafeWebhookUrl::httpClientOptions($this->webhookUrl); } catch (\RuntimeException $e) { Log::warning('SendWebhookJob: blocked unsafe webhook URL at send time', [ 'url' => SafeWebhookUrl::redactedUrlForLog($this->webhookUrl), 'error' => $e->getMessage(), ]); return; } Http::withOptions($httpOptions)->post($this->webhookUrl, $this->payload); } }