更新 'app/controller/Index.php'
This commit is contained in:
@@ -21,7 +21,11 @@ class Index
|
||||
|
||||
public function index(Request $request, $checkIp = null)
|
||||
{
|
||||
$ip = $request->getRealIp();
|
||||
//$ip = $request->getRealIp();
|
||||
|
||||
$header = $request->header();
|
||||
|
||||
$ip = $header['x-real-ip'];
|
||||
|
||||
if ($checkIp) {
|
||||
$ip = gethostbyname($checkIp);
|
||||
@@ -36,7 +40,11 @@ class Index
|
||||
|
||||
public function location(Request $request, $checkIp = null)
|
||||
{
|
||||
$ip = $request->getRealIp();
|
||||
//$ip = $request->getRealIp();
|
||||
|
||||
$header = $request->header();
|
||||
|
||||
$ip = $header['x-real-ip'];
|
||||
|
||||
if ($checkIp) {
|
||||
$ip = gethostbyname($checkIp);
|
||||
|
||||
Reference in New Issue
Block a user