diff --git a/web/index_dev.php b/web/index_dev.php index 0e9a229a8..f653270d6 100755 --- a/web/index_dev.php +++ b/web/index_dev.php @@ -42,11 +42,11 @@ $request = Request::createFromGlobals(); $thelia = new Thelia("dev", true); if ( false === in_array($request->getClientIp(), $trustedIp)) { - // Redirect 401 Unauthorized - $response = new Response('Unauthorized', 401); + $response = Response::create('Forbidden', 403)->send(); + $thelia->terminate($request, $response); +} else { + $response = $thelia->handle($request)->prepare($request)->send(); $thelia->terminate($request, $response); } -$response = $thelia->handle($request)->prepare($request)->send(); -$thelia->terminate($request, $response); \ No newline at end of file