Browse Source

KERNEL-5056 fix: 使用自定义分隔符

release/10.0
Cloud.Liu 4 years ago
parent
commit
3c679ebd88
  1. 5
      fine-socketio/src/main/java/com/fr/third/socketio/handler/EncoderHandler.java

5
fine-socketio/src/main/java/com/fr/third/socketio/handler/EncoderHandler.java

@ -29,7 +29,6 @@ import java.util.jar.Manifest;
import com.fr.third.socketio.Configuration;
import com.fr.third.socketio.Transport;
import com.fr.third.springframework.beans.propertyeditors.StringArrayPropertyEditor;
import io.netty.util.concurrent.Future;
import io.netty.util.concurrent.GenericFutureListener;
import org.slf4j.Logger;
@ -81,6 +80,8 @@ public class EncoderHandler extends ChannelOutboundHandlerAdapter {
private static final Logger log = LoggerFactory.getLogger(EncoderHandler.class);
private static final String SEPARATOR_COMMA = ",";
private final PacketEncoder encoder;
private String version;
@ -208,7 +209,7 @@ public class EncoderHandler extends ChannelOutboundHandlerAdapter {
if (!isEmpty(allowHeaders)) {
String header = res.headers().get(HttpHeaderNames.ACCESS_CONTROL_ALLOW_HEADERS);
if (!isEmpty(header)) {
header = header.trim() + StringArrayPropertyEditor.DEFAULT_SEPARATOR + configuration.getAccessControlAllowHeaders();
header = header.trim() + SEPARATOR_COMMA + configuration.getAccessControlAllowHeaders();
res.headers().set(HttpHeaderNames.ACCESS_CONTROL_ALLOW_HEADERS, header);
} else {
res.headers().set(HttpHeaderNames.ACCESS_CONTROL_ALLOW_HEADERS, configuration.getAccessControlAllowHeaders());

Loading…
Cancel
Save