This commit is contained in:
nurmuhammet committed 2025-04-20 11:04:45 +05:00
1 parent 711a6dddad
commit 2c76c6bad2
3 files changed
+15 -11

No files matched your search

+10 -9
View File
@@ -7,6 +7,7 @@
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Log;
use Stevebauman\Location\Facades\Location;
use Symfony\Component\HttpFoundation\IpUtils;
/**
* Application locales
@@ -49,15 +50,15 @@ function isLocalIp(string $ip = ''): bool
*/
function isTurkmenIp(string $ip = ''): bool
{
$patterns = ['95.85', '216'];
foreach ($patterns as $pattern) {
if (strpos($ip, $pattern) === 0) {
return true;
}
}
return false;
return IpUtils::checkIp($ip, [
'95.85.192.0/19',
'95.85.224.0/20',
'95.85.240.0/21',
'95.85.248.0/22',
'95.85.252.0/22',
'217.174.224.0/19',
'91.207.136.0/22',
]);
}
/**