(Grav GitSync) Automatic Commit from smokephil
This commit is contained in:
parent
d73d0ba519
commit
96a01e3ab4
260 changed files with 25905 additions and 16011 deletions
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue