Add proxy IP headers to Telegram notifications
All checks were successful
Tests / Laravel tests (pull_request) Successful in 12m3s

This commit is contained in:
2026-06-04 00:30:44 +02:00
parent 03b06632f9
commit da4bdc6bf4
6 changed files with 96 additions and 19 deletions

View File

@@ -15,16 +15,18 @@ class NotifyTelegramAboutPageVisit implements ShouldQueue
/**
* @param array<string, mixed> $visit
* @param array<string, string|null> $ipHeaders
*/
public function __construct(
protected array $visit,
protected ?string $ip,
protected ?string $userAgent,
protected ?string $acceptLanguage
protected ?string $acceptLanguage,
protected array $ipHeaders = []
) {}
public function handle(TelegramNotificationService $telegram): void
{
$telegram->notifyPageVisit($this->visit, $this->ip, $this->userAgent, $this->acceptLanguage);
$telegram->notifyPageVisit($this->visit, $this->ip, $this->userAgent, $this->acceptLanguage, $this->ipHeaders);
}
}