Browse Source

前端跨域问题

master
wanghongjun 3 years ago
parent
commit
2d0bc10e96
  1. 1
      source/application/api/controller/Controller.php

1
source/application/api/controller/Controller.php

@ -27,6 +27,7 @@ class Controller extends \think\Controller
public function _initialize()
{
header("Access-Control-Allow-Origin: http://192.168.66.220:8080");
header("Access-Control-Allow-Origin: http://192.168.66.220:8081");
header("Access-Control-Allow-Methods: GET, POST, PUT, DELETE");
header("Access-Control-Allow-Headers: Content-Type");
header("Access-Control-Allow-Credentials: true");

Loading…
Cancel
Save