Support CF-Connecting-IPv6 header

This commit is contained in:
Jamie Cameron
2023-08-22 18:46:43 -07:00
parent 318150e6b0
commit 3d482d2bf5

View File

@@ -1452,7 +1452,8 @@ alarm(0);
local $headerhost = $header{'x-forwarded-for'} ||
$header{'x-real-ip'} ||
$header{'true-client-ip'} ||
$header{'cf-connecting-ip'};
$header{'cf-connecting-ip'} ||
$header{'cf-connecting-ip6'};
if ($headerhost) {
# Only real IPs are allowed
$headerhost = undef if (!&check_ipaddress($headerhost) &&