mirror of
https://gitee.com/apiadmin/ApiAdmin.git
synced 2025-04-25 19:06:35 +08:00
修复bug:前端调用api模块的api时提示跨域错误的问题
This commit is contained in:
parent
fd954a924e
commit
efc1f4ae1e
@ -23,6 +23,8 @@ class BuildResponse {
|
|||||||
* @throws \think\exception\DbException
|
* @throws \think\exception\DbException
|
||||||
*/
|
*/
|
||||||
public function run($response) {
|
public function run($response) {
|
||||||
|
$header = config('apiAdmin.CROSS_DOMAIN');
|
||||||
|
$response->header($header);
|
||||||
$data = $response->getData();
|
$data = $response->getData();
|
||||||
$request = Request::instance();
|
$request = Request::instance();
|
||||||
$hash = $request->routeInfo();
|
$hash = $request->routeInfo();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user