add httpcache into index_dev.php file
This commit is contained in:
@@ -24,6 +24,7 @@
|
|||||||
use Thelia\Core\Thelia;
|
use Thelia\Core\Thelia;
|
||||||
use Thelia\Core\HttpFoundation\Response;
|
use Thelia\Core\HttpFoundation\Response;
|
||||||
use Thelia\Core\HttpFoundation\Request;
|
use Thelia\Core\HttpFoundation\Request;
|
||||||
|
use Thelia\Core\HttpKernel\HttpCache\HttpCache;
|
||||||
|
|
||||||
//use Symfony\Component\DependencyInjection;
|
//use Symfony\Component\DependencyInjection;
|
||||||
|
|
||||||
@@ -43,6 +44,7 @@ if ( false === in_array($request->getClientIp(), $trustedIp)) {
|
|||||||
$response = Response::create('Forbidden', 403)->send();
|
$response = Response::create('Forbidden', 403)->send();
|
||||||
$thelia->terminate($request, $response);
|
$thelia->terminate($request, $response);
|
||||||
} else {
|
} else {
|
||||||
|
//$thelia = new HttpCache($thelia);
|
||||||
$response = $thelia->handle($request)->prepare($request)->send();
|
$response = $thelia->handle($request)->prepare($request)->send();
|
||||||
$thelia->terminate($request, $response);
|
$thelia->terminate($request, $response);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user