From 2bacb1b9e17bc24595428c27038b4ccae589ddc5 Mon Sep 17 00:00:00 2001 From: Hamza-Ayed Date: Sun, 26 Jul 2026 03:22:47 +0300 Subject: [PATCH] =?UTF-8?q?=D8=AA=D8=AD=D8=AF=D9=8A=D8=AB=20=D8=B4=D8=A7?= =?UTF-8?q?=D9=85=D9=84=20=D9=84=D9=84=D9=88=D8=AD=D8=A9=20=D8=A7=D9=84?= =?UTF-8?q?=D8=AA=D8=AD=D9=83=D9=85=20=D9=88=D8=A5=D8=B6=D8=A7=D9=81=D8=A9?= =?UTF-8?q?=20=D9=83=D8=A7=D9=81=D8=A9=20=D8=A7=D9=84=D9=85=D9=8A=D8=B2?= =?UTF-8?q?=D8=A7=D8=AA=20=D9=84=D9=84=D9=80=20WebSidebar?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/Admin/jwtService.php | 11 ++--- backend/Admin/rides/get_driver_live_pos.php | 2 +- backend/Admin/rides/get_rides_by_status.php | 2 +- backend/core/bootstrap.php | 4 +- backend/fix_cors.php | 40 +++++++++++++++++++ backend/login.php | 11 ++--- backend/loginAdmin.php | 17 +++----- backend/loginFirstTime.php | 11 ++--- backend/loginFirstTimeDriver.php | 11 ++--- backend/loginJwtDriver.php | 11 ++--- backend/loginWallet.php | 11 ++--- .../location/getUpdatedLocationForAdmin.php | 2 +- backend/ride/rides/get_driver_location.php | 2 +- backend/ride/rides/public_track_location.php | 4 +- dashboard/siro-admin/flutter_bootstrap.js | 2 +- dashboard/siro-admin/index.html | 2 +- 16 files changed, 80 insertions(+), 63 deletions(-) create mode 100644 backend/fix_cors.php diff --git a/backend/Admin/jwtService.php b/backend/Admin/jwtService.php index 7c4eb5e1..c62191cd 100644 --- a/backend/Admin/jwtService.php +++ b/backend/Admin/jwtService.php @@ -6,14 +6,11 @@ require_once __DIR__ . '/../core/bootstrap.php'; header('Content-Type: application/json'); -header("Access-Control-Allow-Origin: https://siromove.com"); -header("Access-Control-Allow-Methods: POST, OPTIONS"); -header("Access-Control-Allow-Headers: Content-Type, Authorization"); -if ($_SERVER['REQUEST_METHOD'] === 'OPTIONS') { - http_response_code(200); - exit; -} + + + + // ── Rate Limiting ─────────────────────────────────────────── $limiter = new RateLimiter($redis); diff --git a/backend/Admin/rides/get_driver_live_pos.php b/backend/Admin/rides/get_driver_live_pos.php index 03936c58..49173dd2 100644 --- a/backend/Admin/rides/get_driver_live_pos.php +++ b/backend/Admin/rides/get_driver_live_pos.php @@ -6,7 +6,7 @@ require_once __DIR__ . '/../../connect.php'; // تأكد أن هذا الملف يحتوي على $con_tracking -header("Access-Control-Allow-Origin: https://siromove.com"); + header("Content-Type: application/json; charset=UTF-8"); try { diff --git a/backend/Admin/rides/get_rides_by_status.php b/backend/Admin/rides/get_rides_by_status.php index 94700900..f128706b 100644 --- a/backend/Admin/rides/get_rides_by_status.php +++ b/backend/Admin/rides/get_rides_by_status.php @@ -1,7 +1,7 @@ - +