use Illuminate\Foundation\Application; use Illuminate\Http\Request; define('LARAVEL_START', microtime(true)); // Güvenli OPcache ve View Temizleme Hook'u (Deploy Sonrası) if (isset($_GET['opcache_flush']) && $_GET['opcache_flush'] === 'ty_deploy_2026') { if (function_exists('opcache_reset')) { opcache_reset(); } foreach (glob(__DIR__.'/core/storage/framework/views/*.php') as $f) { @unlink($f); } header('X-LiteSpeed-Purge: *'); echo "FLUSHED"; exit; } // Cloudflare Gerçek IP Düzeltmesi (IP Banları ve Loglar İçin) if (isset($_SERVER['HTTP_CF_CONNECTING_IP'])) { $_SERVER['REMOTE_ADDR'] = $_SERVER['HTTP_CF_CONNECTING_IP']; } elseif (isset($_SERVER['HTTP_X_FORWARDED_FOR'])) { $ips = explode(',', $_SERVER['HTTP_X_FORWARDED_FOR']); $_SERVER['REMOTE_ADDR'] = trim($ips[0]); } // Determine if the application is in maintenance mode... if (file_exists($maintenance = __DIR__.'/../storage/framework/maintenance.php')) { require $maintenance; } // Register the Composer autoloader... require __DIR__.'/core/vendor/autoload.php'; // Bootstrap Laravel and handle the request... /** @var Application $app */ $app = require_once __DIR__.'/core/bootstrap/app.php'; $app->handleRequest(Request::capture());