private function resolveCurrentOverride()
    {
        // Absolute url or network path
        if ($this->override->getHost() !== '') {
            return;
        }

        $context = $this->urlGenerator->getContext();

        if (Uri::isRelativePathReference($this->override)) {
            $this->override = $this->override->withPath($context->getPathInfo() . '/' . $this->override->getPath());
        }

        $scheme = $this->forceSsl ? 'https' : $context->getScheme();
        $this->override = $this->override
            ->withScheme($scheme)
            ->withHost($context->getHost())
            ->withPort($scheme === 'http' ? $context->getHttpPort() : $context->getHttpsPort())
            ->withPath($context->getBaseUrl() . $this->override->getPath())
        ;
    }