Don't convert Cloudflare IP if CF-Worker header is set

This commit is contained in:
Kijin Sung 2025-02-13 22:43:46 +09:00
parent 00db2ab402
commit 08d6db7657
2 changed files with 10 additions and 1 deletions

View file

@ -135,7 +135,7 @@ class IpFilter
*/
public static function getCloudFlareRealIP()
{
if (!isset($_SERVER['HTTP_CF_CONNECTING_IP']))
if (!isset($_SERVER['HTTP_CF_CONNECTING_IP']) || isset($_SERVER['HTTP_CF_WORKER']))
{
return false;
}