- add tests casper JS on coupon
This commit is contained in:
gmorel
2013-09-11 17:10:36 +02:00
parent 8d71bfecc5
commit 33d6c85052
2 changed files with 17 additions and 10 deletions

View File

@@ -32,19 +32,19 @@ $env = 'dev';
require __DIR__ . '/../core/bootstrap.php';
// List of allowed IP
$trustedIp = array(
'::1',
'127.0.0.1'
);
//$trustedIp = array(
// '::1',
// '127.0.0.1'
//);
$request = Request::createFromGlobals();
$thelia = new Thelia("dev", true);
if ( false === in_array($request->getClientIp(), $trustedIp)) {
// Redirect 401 Unauthorized
$response = new Response('Unauthorized', 401);
$thelia->terminate($request, $response);
}
//if ( false === in_array($request->getClientIp(), $trustedIp)) {
// // Redirect 401 Unauthorized
// $response = new Response('Unauthorized', 401);
// $thelia->terminate($request, $response);
//}
$response = $thelia->handle($request)->prepare($request)->send();