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

@@ -25,8 +25,18 @@ class NotifyTelegramAboutContactMessage implements ShouldQueue
protected ?string $phone;
public function __construct(string $name, string $message, string $ip, string $userAgent, ?string $email = null, ?string $phone = null)
{
/**
* @param array<string, string|null> $ipHeaders
*/
public function __construct(
string $name,
string $message,
string $ip,
string $userAgent,
?string $email = null,
?string $phone = null,
protected array $ipHeaders = []
) {
$this->name = $name;
$this->message = $message;
$this->ip = $ip;
@@ -43,7 +53,8 @@ class NotifyTelegramAboutContactMessage implements ShouldQueue
$this->ip,
$this->userAgent,
$this->email,
$this->phone
$this->phone,
$this->ipHeaders
);
}
}