ENHANCEMENT: added security hardening
This commit is contained in:
parent
0ae17fd1d9
commit
c9b109601a
@ -1,6 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
session_start();
|
|
||||||
require_once "vendor/autoload.php";
|
require_once "vendor/autoload.php";
|
||||||
|
|
||||||
if( ini_get('safe_mode') ){
|
if( ini_get('safe_mode') ){
|
||||||
|
@ -100,6 +100,12 @@ class Kernel
|
|||||||
$this->router = new Router();
|
$this->router = new Router();
|
||||||
$this->router->parseRoutes($this->getConfigDir(), 'routes.yaml');
|
$this->router->parseRoutes($this->getConfigDir(), 'routes.yaml');
|
||||||
$request = $this->parseRequest();
|
$request = $this->parseRequest();
|
||||||
|
if($request->isSecure()) {
|
||||||
|
ini_set('session.cookie_httponly', true);
|
||||||
|
ini_set('session.cookie_secure', true);
|
||||||
|
}
|
||||||
|
|
||||||
|
session_start();
|
||||||
return $this->router->route($request, $this);
|
return $this->router->route($request, $this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user