isStaticAsset($uri) || $this->isNextJsRoute($uri) ); } /** * Determine if the incoming request is for a static file. */ public function isStaticFile(string $sitePath, string $siteName, string $uri)/* : string|false */ { $sitePath = dirname($sitePath) . DIRECTORY_SEPARATOR . 'backend'; if (str_starts_with($uri, '/_next') && file_exists($staticFilePath = $sitePath . str_replace('_next', '.next', $uri))) { return $staticFilePath; } if ($this->isStaticAsset($uri) && file_exists($staticFilePath = $sitePath . '/public' . $uri)) { return $staticFilePath; } return false; } /** * Get the fully resolved path to the application's front controller. */ public function frontControllerPath(string $sitePath, string $siteName, string $uri): ?string { return dirname($sitePath) . '/backend/index.php'; } }