(Grav GitSync) Automatic Commit from smokephil

This commit is contained in:
smokephil 2025-11-11 19:27:29 +01:00 committed by GitSync
parent d73d0ba519
commit 96a01e3ab4
260 changed files with 25905 additions and 16011 deletions

View file

@ -396,9 +396,10 @@ class AdminPlugin extends Plugin
// Force SSL with redirect if required
if ($config->get('system.force_ssl')) {
if (!isset($_SERVER['HTTPS']) || strtolower($_SERVER['HTTPS']) !== 'on') {
$scheme = $this->uri->scheme(true);
if ($scheme !== 'https') {
Admin::DEBUG && Admin::addDebugMessage('Admin SSL forced on, redirect');
$url = 'https://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
$url = 'https://' . $this->uri->host() . $this->uri->uri();
$this->grav->redirect($url);
}
}