!12 修复bug:前端调用api模块的api时提示跨域错误的问题

Merge pull request !12 from unset/master
This commit is contained in:
unset 2018-07-31 19:34:45 +08:00 committed by Zhao
commit f76276b943

View File

@ -23,6 +23,8 @@ class BuildResponse {
* @throws \think\exception\DbException
*/
public function run($response) {
$header = config('apiAdmin.CROSS_DOMAIN');
$response->header($header);
$data = $response->getData();
$request = Request::instance();
$hash = $request->routeInfo();