Naprawa lokalizacji - odczytu

This commit is contained in:
2026-06-10 20:31:48 +02:00
parent 04aaa6e321
commit 79a83d4d73
16 changed files with 1826 additions and 477 deletions

22
api/geo_bypass.php Normal file
View File

@@ -0,0 +1,22 @@
<?php
header('Content-Type: application/json; charset=utf-8');
require_once __DIR__ . '/request_ip.php';
if ($_SERVER['REQUEST_METHOD'] !== 'GET') {
http_response_code(405);
echo json_encode([
'status' => 'error',
'message' => 'Method not allowed',
], JSON_UNESCAPED_UNICODE);
exit;
}
$clientIp = getRequestClientIp();
$bypass = isGeoBypassTrustedIp($clientIp);
echo json_encode([
'status' => 'success',
'bypassGeo' => $bypass,
'clientIp' => $clientIp,
], JSON_UNESCAPED_UNICODE);