diff --git a/backend/core/bootstrap.php b/backend/core/bootstrap.php index 7b6c9c7b..556cc092 100644 --- a/backend/core/bootstrap.php +++ b/backend/core/bootstrap.php @@ -51,7 +51,8 @@ if (in_array($origin, $allowedOrigins)) { header('Access-Control-Allow-Methods: POST, GET, OPTIONS'); header('Access-Control-Allow-Headers: Content-Type, Authorization, X-Device-FP, X-HMAC-Auth, X-Internal-Key'); -if ($_SERVER['REQUEST_METHOD'] === 'OPTIONS') { +// REQUEST_METHOD غير معرّف عند التشغيل من سطر الأوامر (سكربتات الترحيل) +if (($_SERVER['REQUEST_METHOD'] ?? '') === 'OPTIONS') { http_response_code(200); exit; }