mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2025-04-06 03:58:04 +08:00
[更新]修改接口SESSION处理,强制开启SESSION
ThinkPHP V5.1.x 没有做兼容处理,目前只能自己判断Session的启动状态 @liu21st
This commit is contained in:
parent
fc3b799863
commit
861f1a7ee5
@ -33,7 +33,9 @@ class ToolsService
|
||||
*/
|
||||
public static function corsOptionsHandler()
|
||||
{
|
||||
Session::init(config('session.'));
|
||||
if (PHP_SESSION_ACTIVE === session_status()) {
|
||||
Session::init(config('session.'));
|
||||
}
|
||||
$token = request()->header('token', '');
|
||||
empty($token) && $token = request()->post('token', '');
|
||||
empty($token) && $token = request()->get('token', '');
|
||||
|
Loading…
x
Reference in New Issue
Block a user