From d77de72c4e0efe43686ed4d505c5446cb1e7faa0 Mon Sep 17 00:00:00 2001 From: Anyon Date: Wed, 16 May 2018 15:37:24 +0800 Subject: [PATCH] =?UTF-8?q?[=E6=9B=B4=E6=96=B0]=E4=BF=AE=E6=AD=A3=E5=9F=BA?= =?UTF-8?q?=E7=A1=80=E6=8E=A5=E5=8F=A3=E5=8F=82=E6=95=B0=E6=94=AF=E6=8C=81?= =?UTF-8?q?=E6=8E=A7=E5=88=B6=E5=99=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- extend/controller/BasicApi.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/extend/controller/BasicApi.php b/extend/controller/BasicApi.php index bee2b8830..75d90bde7 100644 --- a/extend/controller/BasicApi.php +++ b/extend/controller/BasicApi.php @@ -39,11 +39,13 @@ class BasicApi */ public function __construct() { + // Cors跨域Options请求处理 Session::init(config('session.')); ToolsService::corsOptionsHandler(); + // Cors跨域会话切换及初始化 + $this->request = app('request'); $sessionName = $this->request->header(session_name()); empty($sessionName) || session_id($sessionName); - $this->request = app('request'); } /**