Update: 2026-05-15 17:55:39

This commit is contained in:
Hamza-Ayed
2026-05-15 17:55:40 +03:00
parent cf8cf829d8
commit 8b69c99776
4 changed files with 10 additions and 6 deletions

View File

@@ -3,16 +3,19 @@
* Simple Router & Entry Point
*/
// 1. Load Bootstrap
require_once __DIR__ . '/../app/bootstrap/init.php';
// Global Request Logging (non-sensitive)
error_log("Incoming Request: " . ($_SERVER['REQUEST_METHOD'] ?? 'GET') . " " . ($_SERVER['REQUEST_URI'] ?? '/'));
// Public Verification Bypass (Top Priority)
$uri = parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH);
$route = $_GET['route'] ?? str_replace('/api/', '', $uri);
$route = trim($route, '/');
error_log("Router: Resolved route '{$route}'");
if ($route === 'verify' || $route === 'v.php') {
$id = $_GET['id'] ?? null;
require_once APP_PATH . '/modules_app/invoices/verify_public.php';
exit;
}
// Route map: route => [allowed_method, module_file]
$routes = [