Working
- Add error message when not in trusted IP list
This commit is contained in:
@@ -41,8 +41,8 @@ $request = Request::createFromGlobals();
|
|||||||
$thelia = new Thelia("dev", true);
|
$thelia = new Thelia("dev", true);
|
||||||
|
|
||||||
if ( false === in_array($request->getClientIp(), $trustedIp)) {
|
if ( false === in_array($request->getClientIp(), $trustedIp)) {
|
||||||
// Redirect 403 Forbidden
|
// Redirect 401 Unauthorized
|
||||||
$response = new Response('Forbidden', 404);
|
$response = new Response('Unauthorized', 401);
|
||||||
$thelia->terminate($request, $response);
|
$thelia->terminate($request, $response);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user