企业🤖AI智能体构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
# 跨域请求 ``` <?php namespace app\api\controller; use think\Controller; class Bass extends Controller { protected function initialize() { parent::initialize(); header(string:Access-Control-Allow-Origin:*); header(string:Access-Control-Allow-Headers:Authorization, Content-Type, If-Match, If-Modified-Since, If-None-Match, If-Unmodified-Since, X-Requested-With); header(string:Access-Control-Allow-Methods:GET, POST, PUT, DELETE, OPTIONS, PATCH); } } ```