[更新]接口Api会话Token增加

This commit is contained in:
Anyon 2018-05-16 15:26:24 +08:00
parent a6800233b9
commit a46c064d98

View File

@ -39,11 +39,11 @@ class BasicApi
*/
public function __construct()
{
ToolsService::corsOptionsHandler();
$this->request = app('request');
Session::init(config('session.'));
$sessionId = $this->request->header(session_name());
!empty($sessionId) && session_id($sessionId);
ToolsService::corsOptionsHandler();
$sessionName = $this->request->header(session_name());
empty($sessionName) || session_id($sessionName);
}
/**