关于gateworker跨域链接的问题

asssing

请问worker大大,在源码哪里添加以下代码可以解决跨域的问题?
header("Content-Type: text/html; charset=UTF-8");
header("Access-Control-Allow-Origin:*");
header("Access-Control-Allow-Methods:OPTION, POST, GET");
header("Access-Control-Allow-Headers:X-Requested-With, Content-Type");

3850 2 0
2个回答

walkor

跨域是http协议才有的问题。
gatewayWorker用于长链接即时通讯的,不适合用http协议。

  • 暂无评论
asssing

谢谢worker的耐心解答

  • 暂无评论
年代过于久远,无法发表回答
🔝