Browse Source

路由修改

moshaorui 3 weeks ago
parent
commit
f2ab1c78f2
1 changed files with 3 additions and 4 deletions
  1. 3 4
      routes/web.php

+ 3 - 4
routes/web.php

@@ -25,9 +25,9 @@ use App\Models\DistAdminDistributor;
 */
 
 //巴西官网专用路由
-$host = $_SERVER['HTTP_HOST']; // 获取当前域名
-$uri = $_SERVER['REQUEST_URI']; // 获取当前请求的URI
-$brHost = 'internal-demo-site.mietubl.com.cn'; // 巴西官网域名
+$host = request()->getHttpHost();    // 安全且可靠
+$uri = request()->getRequestUri();
+$brHost = env('BR_HOST'); // 巴西官网域名
 if ($host == $brHost) {
     $segments = explode('/', $uri);
     if ($segments) {
@@ -51,7 +51,6 @@ if ($host == $brHost) {
             }
         }
     }
-
 }