public static function addLeadingSlash($uri)
    {
        $uri = self::filterUri($uri);
        $path = $uri->getPath();
        if ('/' !== ($path[0] ?? '')) {
            $path = '/'.$path;
        }

        return self::normalizePath($uri, $path);
    }