Skip to content

Commit

Permalink
Merge pull request #321 from PROCERGS/dev
Browse files Browse the repository at this point in the history
Adding detected IP for better debugging
  • Loading branch information
guilhermednt committed Dec 18, 2015
2 parents 7cac8c4 + f7bb639 commit f15d68c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions web/app_dev.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,11 @@

$request = Request::createFromGlobals();

$allowed = $params['parameters']['dev_allowed'];
if (!IpUtils::checkIp($request->getClientIp(), $allowed)) {
$allowed = $params['parameters']['dev_allowed'];
$clientIp = $request->getClientIp();
if (!IpUtils::checkIp($clientIp, $allowed)) {
header('HTTP/1.0 403 Forbidden');
exit('You are not allowed to access this file.');
exit("You ($clientIp) are not allowed to access this file.");
}

$response = $kernel->handle($request);
Expand Down

0 comments on commit f15d68c

Please sign in to comment.