route接口允许跨域访问

This commit is contained in:
imndx
2019-06-29 16:42:55 +08:00
parent 39b62e5942
commit 66961b94da
3 changed files with 22 additions and 8 deletions
@@ -260,7 +260,7 @@ public class NettyAcceptor implements ServerAcceptor {
pipeline.addLast(new HttpServerCodec());
pipeline.addLast("aggregator", new HttpObjectAggregator(65536));
pipeline.addLast("webSocketHandler",
new WebSocketServerProtocolHandler("/org/fusesource/mqtt", MQTT_SUBPROTOCOL_CSV_LIST));
new WebSocketServerProtocolHandler("/", MQTT_SUBPROTOCOL_CSV_LIST));
pipeline.addLast("ws2bytebufDecoder", new WebSocketFrameToByteBufDecoder());
pipeline.addLast("bytebuf2wsEncoder", new ByteBufToWebSocketFrameEncoder());
pipeline.addFirst("idleStateHandler", new IdleStateHandler(nettyChannelTimeoutSeconds, 0, 0));