public static function instance(array $server)
    {
        $secure = isset($server['HTTPS']) ? $server['HTTPS'] : 'off';

        $http = $secure === 'off' ? 'http' : 'https';

        $url = $http . '://' . $server['SERVER_NAME'];

        $url .= (string) $server['SERVER_PORT'];

        return new Uri($url . $server['REQUEST_URI']);
    }