add templateimg

This commit is contained in:
2018-07-26 08:20:55 +02:00
parent 89b9500179
commit 21d6860753
140 changed files with 6142 additions and 492 deletions
+10
View File
@@ -317,6 +317,16 @@ class AdminPlugin extends Plugin
*/
public function onPagesInitialized()
{
$config = $this->config;
// Force SSL with redirect if required
if ($config->get('system.force_ssl')) {
if (!isset($_SERVER['HTTPS']) || $_SERVER['HTTPS'] !== 'on') {
$url = 'https://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
$this->grav->redirect($url);
}
}
$this->session = $this->grav['session'];
// Set original route for the home page.