Add proxy IP headers to Telegram notifications
All checks were successful
Tests / Laravel tests (pull_request) Successful in 12m3s
All checks were successful
Tests / Laravel tests (pull_request) Successful in 12m3s
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user