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(); }