多应用+插件架构,代码干净,二开方便,首家独创一键云编译技术,文档视频完善,免费商用码云13.8K 广告
# 跨域 ## nginx 代理 ``` location /apis { rewrite ^.+apis/?(.*)$ /$1 break; include uwsgi_params; proxy_pass http://api.xiaoan.mogo.club; } ``` ## header 发送的option请求返回200即可跨域 ``` header('Access-Control-Allow-Origin:*'); if($this->request->isOptions()){ header('content-type:application:json;charset=utf8'); header('Access-Control-Allow-Methods:POST'); header('Access-Control-Allow-Headers:x-requested-with,content-type'); exit; } ```