Netty Socketio解决Access-Control-A
作者:
奇乞祈兴 | 来源:发表于
2018-04-17 13:49 被阅读0次node.js服务器:
io.set('transports', ['websocket', 'xhr-polling', 'jsonp-polling', 'htmlfile', 'flashsocket']);
io.set('origins', '*:*');
JAVA服务器:
Configuration config = new Configuration();
config.setTransports(Transport.POLLING, Transport.WEBSOCKET);
config.setOrigin(":*:");
客户端:
var socket = io.connect('http://127.0.0.1:8081',{transports:['websocket','xhr-polling','jsonp-polling']});
本文标题:Netty Socketio解决Access-Control-A
本文链接:https://www.haomeiwen.com/subject/jaeukftx.html
网友评论