Skip to content

Commit

Permalink
Minor bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Juan Pablo Garcia committed Dec 5, 2017
1 parent aaca3e2 commit 0e9bc29
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/IpFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,12 @@ public function __invoke($request, $response, $next)
$isallow = isset($option['allow']) ? $option['allow'] : false;
}
}
if ($isallow === false) {
return $response->withStatus(403);
}

}elseif (!Validator::ip($option['ip'])->validate($ipAddress)) {
}elseif (Validator::ip($option['ip'])->validate($ipAddress)) {
$isallow = isset($option['allow']) ? $option['allow'] : false;
}
if ($isallow === false) {
return $response->withStatus(403);
}

}
return $next($request, $response);
}
Expand Down

0 comments on commit 0e9bc29

Please sign in to comment.