'text/css', 'js' => 'application/javascript', 'mjs' => 'application/javascript', 'json' => 'application/json', 'png' => 'image/png', 'jpg' => 'image/jpeg', 'jpeg' => 'image/jpeg', 'gif' => 'image/gif', 'svg' => 'image/svg+xml', 'ico' => 'image/x-icon', 'webp' => 'image/webp', 'woff' => 'font/woff', 'woff2' => 'font/woff2', 'ttf' => 'font/ttf', 'map' => 'application/json', 'txt' => 'text/plain', 'xml' => 'application/xml', 'pdf' => 'application/pdf', ]; $ext = strtolower(pathinfo($staticPath, PATHINFO_EXTENSION)); header('Content-Type: ' . ($mimeMap[$ext] ?? 'application/octet-stream')); header('Content-Length: ' . filesize($staticPath)); header('Cache-Control: public, max-age=3600'); readfile($staticPath); return true; } require $publicDir . '/index.php';