mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2025-04-06 03:58:04 +08:00
[更新]接口Api会话Token增加
This commit is contained in:
parent
a6800233b9
commit
a46c064d98
@ -39,11 +39,11 @@ class BasicApi
|
|||||||
*/
|
*/
|
||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
|
ToolsService::corsOptionsHandler();
|
||||||
$this->request = app('request');
|
$this->request = app('request');
|
||||||
Session::init(config('session.'));
|
Session::init(config('session.'));
|
||||||
$sessionId = $this->request->header(session_name());
|
$sessionName = $this->request->header(session_name());
|
||||||
!empty($sessionId) && session_id($sessionId);
|
empty($sessionName) || session_id($sessionName);
|
||||||
ToolsService::corsOptionsHandler();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user