diff --git a/core/includes/install.core.inc b/core/includes/install.core.inc index db35fd7..bd580d6 100644 --- a/core/includes/install.core.inc +++ b/core/includes/install.core.inc @@ -156,7 +156,7 @@ function install_drupal($class_loader, $settings = array()) { } elseif ($state['installation_finished']) { // Redirect to the newly installed site. - install_goto(''); + install_goto_installed_site(); } } } diff --git a/core/includes/install.inc b/core/includes/install.inc index 77e0b70..e9c4159 100644 --- a/core/includes/install.inc +++ b/core/includes/install.inc @@ -12,6 +12,7 @@ use Drupal\Component\Utility\UrlHelper; use Drupal\Core\Extension\ExtensionDiscovery; use Drupal\Core\Site\Settings; +use Drupal\Core\Url; /** * Requirement severity -- Informational message only. @@ -844,6 +845,20 @@ function install_goto($path) { } /** + * Sends the user to the newly installed site's front page. + * + * This issues an on-site HTTP redirect. Messages (and errors) are erased. + */ +function install_goto_installed_site() { + $headers = array( + // Not a permanent redirect. + 'Cache-Control' => 'no-cache', + ); + $response = new RedirectResponse(Url::fromRoute('')->toString(), 302, $headers); + $response->send(); +} + +/** * Returns the URL of the current script, with modified query parameters. * * This function can be called by low-level scripts (such as install.php and