    public function onRouteShutdown(Enlight_Controller_EventArgs $args)
    {
        $request = $args->getRequest();
        $response = $args->getResponse();

        if (Shopware()->Container()->initialized('shop')) {
            /** @var DetachedShop $shop */
            $shop = $this->get('shop');

            if ($request->getHttpHost() !== $shop->getHost()) {
                if ($request->isSecure()) {
                    $newPath = 'https://' . $shop->getHost() . $request->getRequestUri();
                } else {
                    $newPath = 'http://' . $shop->getHost() . $shop->getBaseUrl();
                }
            }

            // Strip /shopware.php/ from string and perform a redirect
            $preferBasePath = $this->get(Shopware_Components_Config::class)->preferBasePath;
            if ($preferBasePath && strpos($request->getPathInfo(), '/shopware.php/') === 0) {
                $removePath = $request->getBasePath() . '/shopware.php';
                $newPath = str_replace($removePath, $request->getBasePath(), $request->getRequestUri());
            }

            if (isset($newPath)) {
                // reset the cookie so only one valid cookie will be set IE11 fix
                $basePath = $shop->getBasePath();
                if ($basePath === null || $basePath === '') {
                    $basePath = '/';
                }
                $response->headers->setCookie(new Cookie('session-' . $shop->getId(), '', 1, $basePath));
                $response->setRedirect($newPath, 301);
            } else {
                $this->upgradeShop($request, $response);
                $this->initServiceMode($request);
            }

            $this->get(ContextServiceInterface::class)->initializeShopContext();
        }
    }
A web application accepts a user-controlled input that specifies a link to an external site, and uses that link in a Redirect. This simplifies phishing attacks.