|
@@ -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) {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
|
|
|
|