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

This commit is contained in:
unset 2018-07-31 17:07:47 +08:00
parent fd954a924e
commit efc1f4ae1e

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();