workerman php 跨域头设置

       Http::header("Access-Control-Allow-Origin: *"); // 允许任意域名发起的跨域请求  
       Http::header('Access-Control-Allow-Headers: Origin, X-Requested-With, Content-Type, Accept');

       Http::header('Access-Control-Allow-Methods: GET, POST, PUT,OPTIONS');


一定要允许OPTIONS请求

展开阅读全文

没有更多推荐了,返回首页