Browse Source

fix:获取真实ip

lh 3 years ago
parent
commit
172ae5b518
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/Middleware/CompanyAuth.php

+ 1 - 1
src/Middleware/CompanyAuth.php

@@ -21,7 +21,7 @@ class CompanyAuth
         $validate = new CompanyAuthRequest($request);
         $validate->validate();
         $client_ip = CommonHelper::GetClientIp();
-        $request->setTrustedProxies($request->getClientIps(), $client_ip);
+        $request->setTrustedProxies(['111.222.333.444']);
         if (in_array($client_ip, $service->CompanyAuthIps($app_id))) {
             $params = $request->except('_url');
             $timestamp = (int) $params['timestamp'];