mirror of
https://github.com/getgrav/grav.git
synced 2026-02-26 16:41:34 +01:00
Fix force_ssl redirect in case of undefined hostname (#3702)
This commit is contained in:
@@ -72,7 +72,7 @@ class PagesServiceProvider implements ServiceProviderInterface
|
||||
if ($config->get('system.force_ssl')) {
|
||||
$scheme = $uri->scheme(true);
|
||||
if ($scheme !== 'https') {
|
||||
$url = 'https://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
|
||||
$url = 'https://' . $uri->host() . $uri->uri();
|
||||
$grav->redirect($url);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user