mirror of
https://github.com/getgrav/grav.git
synced 2026-05-07 23:16:59 +02:00
Fixed ERR_TOO_MANY_REDIRECTS with HTTPS = 'On' [#3155]
This commit is contained in:
@@ -31,6 +31,7 @@
|
||||
* Fixed multiple issues with `system.language.translations: false`
|
||||
* Fixed page collections containing dummy items for untranslated default language [#2985](https://github.com/getgrav/grav/issues/2985)
|
||||
* Fixed streams in `setup.php` being overridden by `system/streams.yaml` [#2450](https://github.com/getgrav/grav/issues/2450)
|
||||
* Fixed `ERR_TOO_MANY_REDIRECTS` with HTTPS = 'On' [#3155](https://github.com/getgrav/grav/issues/3155)
|
||||
|
||||
# v1.7.0-rc.20
|
||||
## 12/15/2020
|
||||
|
||||
@@ -70,7 +70,8 @@ class PagesServiceProvider implements ServiceProviderInterface
|
||||
}
|
||||
|
||||
if ($config->get('system.force_ssl')) {
|
||||
if (!isset($_SERVER['HTTPS']) || $_SERVER['HTTPS'] !== 'on') {
|
||||
$scheme = $uri->scheme(true);
|
||||
if ($scheme !== 'https') {
|
||||
$url = 'https://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
|
||||
$grav->redirect($url);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user