From 4e8936623dee359c7dc262acfa562d8fb9adea9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=B1=E9=87=91=E5=8B=87?= Date: Thu, 25 Dec 2025 09:00:18 +0800 Subject: [PATCH] * [frankenphp] refactor isClient --- www/index.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/www/index.php b/www/index.php index c2eebcb878..75390925cd 100644 --- a/www/index.php +++ b/www/index.php @@ -84,8 +84,8 @@ $handler = static function () $common->checkPriv(); $common->checkIframe(); - $isClient = strpos($_SERVER['HTTP_USER_AGENT'], 'xuanxuan') === false && strpos($_SERVER['HTTP_USER_AGENT'], 'uni-app') === false; - if($app->getViewType() != 'json' && (session_id() != $app->sessionID && $isClient)) helper::restartSession($app->sessionID); + $isClient = strpos($_SERVER['HTTP_USER_AGENT'], 'xuanxuan') !== false || strpos($_SERVER['HTTP_USER_AGENT'], 'uni-app') !== false; + if($app->getViewType() != 'json' && session_id() != $app->sessionID && !$isClient) helper::restartSession($app->sessionID); $app->loadModule(); }