Initial commit with updated Auth and media ignored

This commit is contained in:
Hamza-Ayed
2026-04-28 13:04:27 +03:00
commit 67af97474c
477 changed files with 66444 additions and 0 deletions

22
get_connect.php Normal file
View File

@@ -0,0 +1,22 @@
<?php
// ============================================================
// get_connect.php
// بديل con.php و jwtconnect.php للاتصالات الداخلية
// ============================================================
require_once __DIR__ . '/core/bootstrap.php';
// 1. التحقق من مفتاح الحماية الداخلي (بديل الـ JWT للسيرفرات)
JwtService::validateInternalKey();
// 2. Rate Limiting خفيف للطلبات الداخلية
$limiter = new RateLimiter($redis);
$limiter->enforce(RateLimiter::identifier(), 'api');
// 3. الاتصال الافتراضي بقاعدة البيانات (Lazy Load)
try {
$con = Database::get('main');
} catch (Exception $e) {
http_response_code(500);
exit(json_encode(['error' => 'Database connection failed']));
}