更新 'app/controller/Index.php'

This commit is contained in:
2023-03-22 13:43:03 +00:00
parent 6cfe801c11
commit 007a3319bd
+10 -2
View File
@@ -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);