spring-cloud / spring-cloud/spring-cloud-gateway
Errors when proxy web-socket STOMP over SockJs client, 405 Method Not Allowed
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 4.9k
- Forks
- 3.5k
- Avg merge
- 20h 57m
- Merged PRs (30d)
- 8
Description
When I proxy web-socket requests (STOMP over SockJs client) the requests fail. But when I use direct connection without Spring Cloud Gateway it works fine.
I have a service with STOMP messaging and SockJs support. Hosted on localhost:8084
The configuration is here:
@EnableWebSocketMessageBroker
public class WebSocketConfig implements WebSocketMessageBrokerConfigurer {
@Override
public void registerStompEndpoints(StompEndpointRegistry registry) {
registry.addEndpoint("/stream").setAllowedOriginPatterns("*").withSockJS();
}
@Override
public void configureMessageBroker(MessageBrokerRegistry config) {
config.enableSimpleBroker("/topic");
config.setApplicationDestinationPrefixes("/app");
}
}
I'm trying to proxy sockjs endpoint and web-socket through Spring Cloud ApiGateway(hosted on localhost:8080) with the following config:
spring:
cloud:
gateway:
httpclient:
ssl:
useInsecureTrustManager: true
default-filters:
- DedupeResponseHeader=Access-Control-Allow-Credentials Access-Control-Allow-Origin Vary , RETAIN_LAST
globalcors:
corsConfigurations:
'[/**]':
allowedOriginPatterns: "*"
allowedMethods: "*"
allowedHeaders: "*"
allowCredentials: true
routes:
- id: websocket_adapter_sockjs_endpoint
uri: ${SOCKETADAPTER_URI:http://localhost:8084}
predicates:
- Path=/stream/info/**
- id: websocket_adapter
uri: ${SOCKETADAPTER_WS_URI:ws://localhost:8084}
predicates:
- Path=/stream/**
Sockjs Client uses sockjs library and stomp on top:
stompClient = Stomp.over(new SockJS"http://localhost:8080/stream"));
stompClient.connect(
connectParams,
_data => {
this.logger.log('Connected');
this.subscribe();
this.requestSubscription(SocketTypeEnum.DATA, connectParams);
},
this.onConnectionError.bind(this)
);
The moment I try to use gateway I face issues about Upgrade header and 405 Method NOT ALLOWED header and other 400 BAD Request issues.
If I understood it right, those endpoints are meta-endpoint from sockjs they basically are used for defining the protocol ( xdr-streaming, xhr-polling, etc )
Here is the logs from Gateway:
2021-11-23 11:57:38.127 DEBUG 362826 --- [ parallel-7] o.s.c.g.h.RoutePredicateHandlerMapping : Route matched: websocket_adapter_sockjs_endpoint
2021-11-23 11:57:38.128 DEBUG 362826 --- [ parallel-7] o.s.c.g.h.RoutePredicateHandlerMapping : Mapping [Exchange: GET http://localhost:8080/stream/info?t=1637661458031] to Route{id='websocket_adapter_sockjs_endpoint', uri=http://localhost:8084, order=0, predicate=Paths: [/stream/info/**], match trailing slash: true, gatewayFilters=[[[DedupeResponseHeader Access-Control-Allow-Credentials Access-Control-Allow-Origin Vary = RETAIN_LAST], order = 1], [com.fathom.services.apigateway.config.StripApiPrefixGatewayFilterFactory$$Lambda$809/0x0000000800633440@7feceb3a, order = 2]], metadata={}}
2021-11-23 11:57:38.128 DEBUG 362826 --- [ parallel-7] o.s.c.g.h.RoutePredicateHandlerMapping : [b0a2ea43-1] Mapped to org.springframework.cloud.gateway.handler.FilteringWebHandler@46101e93
2021-11-23 11:57:38.128 DEBUG 362826 --- [ parallel-7] o.s.c.g.handler.FilteringWebHandler : Sorted gatewayFilterFactories: [[GatewayFilterAdapter{delegate=org.springframework.cloud.gateway.filter.RemoveCachedBodyFilter@7ac058a0}, order = -2147483648], [GatewayFilterAdapter{delegate=org.springframework.cloud.gateway.filter.AdaptCachedBodyGlobalFilter@4d81e83a}, order = -2147482648], [GatewayFilterAdapter{delegate=org.springframework.cloud.gateway.filter.NettyWriteResponseFilter@73bb573d}, order = -1], [GatewayFilterAdapter{delegate=org.springframework.cloud.gateway.filter.ForwardPathFilter@49754e74}, order = 0], [[DedupeResponseHeader Access-Control-Allow-Credentials Access-Control-Allow-Origin Vary = RETAIN_LAST], order = 1], [com.fathom.services.apigateway.config.StripApiPrefixGatewayFilterFactory$$Lambda$809/0x0000000800633440@7feceb3a, order = 2], [GatewayFilterAdapter{delegate=org.springframework.cloud.gateway.filter.RouteToRequestUrlFilter@736b21ee}, order = 10000], [GatewayFilterAdapter{delegate=org.springframework.cloud.gateway.config.GatewayNoLoadBalancerClientAutoConfiguration$NoLoadBalancerClientFilter@1b46392c}, order = 10150], [GatewayFilterAdapter{delegate=org.springframework.cloud.gateway.filter.WebsocketRoutingFilter@31881aa2}, order = 2147483646], [GatewayFilterAdapter{delegate=org.springframework.cloud.gateway.filter.NettyRoutingFilter@2616b618}, order = 2147483647], [GatewayFilterAdapter{delegate=org.springframework.cloud.gateway.filter.ForwardRoutingFilter@60deefed}, order = 2147483647]]
2021-11-23 11:57:38.342 DEBUG 362826 --- [ parallel-8] o.s.c.g.h.RoutePredicateHandlerMapping : Route matched: websocket_adapter
2021-11-23 11:57:38.342 DEBUG 362826 --- [ parallel-8] o.s.c.g.h.RoutePredicateHandlerMapping : Mapping [Exchange: GET http://localhost:8080/stream/087/04ydlk0i/websocket] to Route{id='websocket_adapter', uri=ws://localhost:8084, order=0, predicate=Paths: [/stream/**], match trailing slash: true, gatewayFilters=[[[DedupeResponseHeader Access-Control-Allow-Credentials Access-Control-Allow-Origin Vary = RETAIN_LAST], order = 1], [com.fathom.services.apigateway.config.StripApiPrefixGatewayFilterFactory$$Lambda$809/0x0000000800633440@76a6511f, order = 2]], metadata={}}
2021-11-23 11:57:38.342 DEBUG 362826 --- [ parallel-8] o.s.c.g.h.RoutePredicateHandlerMapping : [90dcdc08-1] Mapped to org.springframework.cloud.gateway.handler.FilteringWebHandler@46101e93
2021-11-23 11:57:38.342 DEBUG 362826 --- [ parallel-8] o.s.c.g.handler.FilteringWebHandler : Sorted gatewayFilterFactories: [[GatewayFilterAdapter{delegate=org.springframework.cloud.gateway.filter.RemoveCachedBodyFilter@7ac058a0}, order = -2147483648], [GatewayFilterAdapter{delegate=org.springframework.cloud.gateway.filter.AdaptCachedBodyGlobalFilter@4d81e83a}, order = -2147482648], [GatewayFilterAdapter{delegate=org.springframework.cloud.gateway.filter.NettyWriteResponseFilter@73bb573d}, order = -1], [GatewayFilterAdapter{delegate=org.springframework.cloud.gateway.filter.ForwardPathFilter@49754e74}, order = 0], [[DedupeResponseHeader Access-Control-Allow-Credentials Access-Control-Allow-Origin Vary = RETAIN_LAST], order = 1], [com.fathom.services.apigateway.config.StripApiPrefixGatewayFilterFactory$$Lambda$809/0x0000000800633440@76a6511f, order = 2], [GatewayFilterAdapter{delegate=org.springframework.cloud.gateway.filter.RouteToRequestUrlFilter@736b21ee}, order = 10000], [GatewayFilterAdapter{delegate=org.springframework.cloud.gateway.config.GatewayNoLoadBalancerClientAutoConfiguration$NoLoadBalancerClientFilter@1b46392c}, order = 10150], [GatewayFilterAdapter{delegate=org.springframework.cloud.gateway.filter.WebsocketRoutingFilter@31881aa2}, order = 2147483646], [GatewayFilterAdapter{delegate=org.springframework.cloud.gateway.filter.NettyRoutingFilter@2616b618}, order = 2147483647], [GatewayFilterAdapter{delegate=org.springframework.cloud.gateway.filter.ForwardRoutingFilter@60deefed}, order = 2147483647]]
2021-11-23 11:57:38.345 ERROR 362826 --- [or-http-epoll-1] o.s.w.s.adapter.HttpWebHandlerAdapter : [90dcdc08-1] Error [java.lang.UnsupportedOperationException] for HTTP GET "/stream/087/04ydlk0i/websocket", but ServerHttpResponse already committed (200 OK)
2021-11-23 11:57:38.348 ERROR 362826 --- [or-http-epoll-1] r.n.http.server.HttpServerOperations : [id:90dcdc08-1, L:/0:0:0:0:0:0:0:1%0:8080 - R:/0:0:0:0:0:0:0:1%0:54042] Error finishing response. Closing connection
java.lang.UnsupportedOperationException: null
at org.springframework.http.ReadOnlyHttpHeaders.set(ReadOnlyHttpHeaders.java:106) ~[spring-web-5.3.9.jar:5.3.9]
Suppressed: reactor.core.publisher.FluxOnAssembly$OnAssemblyException:
Error has been observed at the following site(s):
|_ checkpoint ⇢ org.springframework.cloud.gateway.filter.WeightCalculatorWebFilter [DefaultWebFilterChain]
|_ checkpoint ⇢ org.springframework.security.web.server.authorization.AuthorizationWebFilter [DefaultWebFilterChain]
|_ checkpoint ⇢ org.springframework.security.web.server.authorization.ExceptionTranslationWebFilter [DefaultWebFilterChain]
|_ checkpoint ⇢ org.springframework.security.web.server.authentication.logout.LogoutWebFilter [DefaultWebFilterChain]
|_ checkpoint ⇢ org.springframework.security.web.server.savedrequest.ServerRequestCacheWebFilter [DefaultWebFilterChain]
|_ checkpoint ⇢ org.springframework.security.web.server.context.SecurityContextServerWebExchangeWebFilter [DefaultWebFilterChain]
|_ checkpoint ⇢ org.springframework.security.web.server.authentication.AuthenticationWebFilter [DefaultWebFilterChain]
|_ checkpoint ⇢ org.springframework.security.web.server.context.ReactorContextWebFilter [DefaultWebFilterChain]
|_ checkpoint ⇢ org.springframework.security.web.server.header.HttpHeaderWriterWebFilter [DefaultWebFilterChain]
|_ checkpoint ⇢ org.springframework.security.config.web.server.ServerHttpSecurity$ServerWebExchangeReactorContextWebFilter [DefaultWebFilterChain]
|_ checkpoint ⇢ org.springframework.security.web.server.WebFilterChainProxy [DefaultWebFilterChain]
|_ checkpoint ⇢ HTTP GET "/stream/087/04ydlk0i/websocket" [ExceptionHandlingWebHandler]
Stack trace:
at org.springframework.http.ReadOnlyHttpHeaders.set(ReadOnlyHttpHeaders.java:106) ~[spring-web-5.3.9.jar:5.3.9]
at org.springframework.cloud.gateway.filter.factory.DedupeResponseHeaderGatewayFilterFactory.dedupe(DedupeResponseHeaderGatewayFilterFactory.java:144) ~[spring-cloud-gateway-server-3.0.3.jar:3.0.3]
at org.springframework.cloud.gateway.filter.factory.DedupeResponseHeaderGatewayFilterFactory.dedupe(DedupeResponseHeaderGatewayFilterFactory.java:130) ~[spring-cloud-gateway-server-3.0.3.jar:3.0.3]
at org.springframework.cloud.gateway.filter.factory.DedupeResponseHeaderGatewayFilterFactory$1.lambda$filter$0(DedupeResponseHeaderGatewayFilterFactory.java:93) ~[spring-cloud-gateway-server-3.0.3.jar:3.0.3]
at reactor.core.publisher.MonoRunnable.call(MonoRunnable.java:73) ~[reactor-core-3.4.9.jar:3.4.9]
at reactor.core.publisher.MonoRunnable.call(MonoRunnable.java:32) ~[reactor-core-3.4.9.jar:3.4.9]
at reactor.core.publisher.MonoIgnoreThen$ThenIgnoreMain.subscribeNext(MonoIgnoreThen.java:224) ~[reactor-core-3.4.9.jar:3.4.9]
at reactor.core.publisher.MonoIgnoreThen$ThenIgnoreMain.onComplete(MonoIgnoreThen.java:203) ~[reactor-core-3.4.9.jar:3.4.9]
at reactor.core.publisher.FluxHide$SuppressFuseableSubscriber.onComplete(FluxHide.java:147) ~[reactor-core-3.4.9.jar:3.4.9]
at reactor.core.publisher.MonoIgnoreThen$ThenIgnoreMain.onComplete(MonoIgnoreThen.java:209) ~[reactor-core-3.4.9.jar:3.4.9]
at reactor.core.publisher.FluxDoOnEach$DoOnEachSubscriber.onComplete(FluxDoOnEach.java:223) ~[reactor-core-3.4.9.jar:3.4.9]
at reactor.netty.FutureMono$FutureSubscription.operationComplete(FutureMono.java:196) ~[reactor-netty-core-1.0.10.jar:1.0.10]
at io.netty.util.concurrent.DefaultPromise.notifyListener0(DefaultPromise.java:578) ~[netty-common-4.1.67.Final.jar:4.1.67.Final]
at io.netty.util.concurrent.DefaultPromise.notifyListeners0(DefaultPromise.java:571) ~[netty-common-4.1.67.Final.jar:4.1.67.Final]
at io.netty.util.concurrent.DefaultPromise.notifyListenersNow(DefaultPromise.java:550) ~[netty-common-4.1.67.Final.jar:4.1.67.Final]
at io.netty.util.concurrent.DefaultPromise.notifyListeners(DefaultPromise.java:491) ~[netty-common-4.1.67.Final.jar:4.1.67.Final]
at io.netty.util.concurrent.DefaultPromise.setValue0(DefaultPromise.java:616) ~[netty-common-4.1.67.Final.jar:4.1.67.Final]
at io.netty.util.concurrent.DefaultPromise.setSuccess0(DefaultPromise.java:605) ~[netty-common-4.1.67.Final.jar:4.1.67.Final]
at io.netty.util.concurrent.DefaultPromise.setSuccess(DefaultPromise.java:96) ~[netty-common-4.1.67.Final.jar:4.1.67.Final]
at io.netty.channel.DefaultChannelPromise.setSuccess(DefaultChannelPromise.java:78) ~[netty-transport-4.1.67.Final.jar:4.1.67.Final]
at io.netty.channel.DefaultChannelPromise.setSuccess(DefaultChannelPromise.java:73) ~[netty-transport-4.1.67.Final.jar:4.1.67.Final]
at io.netty.handler.codec.http.websocketx.WebSocketServerHandshaker$1.operationComplete(WebSocketServerHandshaker.java:229) ~[netty-codec-http-4.1.67.Final.jar:4.1.67.Final]
at io.netty.handler.codec.http.websocketx.WebSocketServerHandshaker$1.operationComplete(WebSocketServerHandshaker.java:223) ~[netty-codec-http-4.1.67.Final.jar:4.1.67.Final]
at io.netty.util.concurrent.DefaultPromise.notifyListener0(DefaultPromise.java:578) ~[netty-common-4.1.67.Final.jar:4.1.67.Final]
at io.netty.util.concurrent.DefaultPromise.notifyListenersNow(DefaultPromise.java:552) ~[netty-common-4.1.67.Final.jar:4.1.67.Final]
at io.netty.util.concurrent.DefaultPromise.notifyListeners(DefaultPromise.java:491) ~[netty-common-4.1.67.Final.jar:4.1.67.Final]
at io.netty.util.concurrent.DefaultPromise.setValue0(DefaultPromise.java:616) ~[netty-common-4.1.67.Final.jar:4.1.67.Final]
at io.netty.util.concurrent.DefaultPromise.setSuccess0(DefaultPromise.java:605) ~[netty-common-4.1.67.Final.jar:4.1.67.Final]
at io.netty.util.concurrent.DefaultPromise.trySuccess(DefaultPromise.java:104) ~[netty-common-4.1.67.Final.jar:4.1.67.Final]
at io.netty.util.internal.PromiseNotificationUtil.trySuccess(PromiseNotificationUtil.java:48) ~[netty-common-4.1.67.Final.jar:4.1.67.Final]
at io.netty.channel.ChannelOutboundBuffer.safeSuccess(ChannelOutboundBuffer.java:717) ~[netty-transport-4.1.67.Final.jar:4.1.67.Final]
at io.netty.channel.ChannelOutboundBuffer.remove(ChannelOutboundBuffer.java:272) ~[netty-transport-4.1.67.Final.jar:4.1.67.Final]
at io.netty.channel.ChannelOutboundBuffer.removeBytes(ChannelOutboundBuffer.java:352) ~[netty-transport-4.1.67.Final.jar:4.1.67.Final]
at io.netty.channel.epoll.AbstractEpollChannel.doWriteBytes(AbstractEpollChannel.java:364) ~[netty-transport-native-epoll-4.1.67.Final-linux-x86_64.jar:4.1.67.Final]
at io.netty.channel.epoll.AbstractEpollStreamChannel.writeBytes(AbstractEpollStreamChannel.java:260) ~[netty-transport-native-epoll-4.1.67.Final-linux-x86_64.jar:4.1.67.Final]
at io.netty.channel.epoll.AbstractEpollStreamChannel.doWriteSingle(AbstractEpollStreamChannel.java:471) ~[netty-transport-native-epoll-4.1.67.Final-linux-x86_64.jar:4.1.67.Final]
at io.netty.channel.epoll.AbstractEpollStreamChannel.doWrite(AbstractEpollStreamChannel.java:429) ~[netty-transport-native-epoll-4.1.67.Final-linux-x86_64.jar:4.1.67.Final]
at io.netty.channel.AbstractChannel$AbstractUnsafe.flush0(AbstractChannel.java:949) ~[netty-transport-4.1.67.Final.jar:4.1.67.Final]
at io.netty.channel.epoll.AbstractEpollChannel$AbstractEpollUnsafe.flush0(AbstractEpollChannel.java:557) ~[netty-transport-native-epoll-4.1.67.Final-linux-x86_64.jar:4.1.67.Final]
at io.netty.channel.AbstractChannel$AbstractUnsafe.flush(AbstractChannel.java:913) ~[netty-transport-4.1.67.Final.jar:4.1.67.Final]
at io.netty.channel.DefaultChannelPipeline$HeadContext.flush(DefaultChannelPipeline.java:1372) ~[netty-transport-4.1.67.Final.jar:4.1.67.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeFlush0(AbstractChannelHandlerContext.java:750) ~[netty-transport-4.1.67.Final.jar:4.1.67.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeFlush(AbstractChannelHandlerContext.java:742) ~[netty-transport-4.1.67.Final.jar:4.1.67.Final]
at io.netty.channel.AbstractChannelHandlerContext.flush(AbstractChannelHandlerContext.java:728) ~[netty-transport-4.1.67.Final.jar:4.1.67.Final]
at io.netty.channel.CombinedChannelDuplexHandler$DelegatingChannelHandlerContext.flush(CombinedChannelDuplexHandler.java:531) ~[netty-transport-4.1.67.Final.jar:4.1.67.Final]
at io.netty.channel.ChannelOutboundHandlerAdapter.flush(ChannelOutboundHandlerAdapter.java:125) ~[netty-transport-4.1.67.Final.jar:4.1.67.Final]
at io.netty.channel.CombinedChannelDuplexHandler.flush(CombinedChannelDuplexHandler.java:356) ~[netty-transport-4.1.67.Final.jar:4.1.67.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeFlush0(AbstractChannelHandlerContext.java:750) ~[netty-transport-4.1.67.Final.jar:4.1.67.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeWriteAndFlush(AbstractChannelHandlerContext.java:765) ~[netty-transport-4.1.67.Final.jar:4.1.67.Final]
at io.netty.channel.AbstractChannelHandlerContext$WriteTask.run(AbstractChannelHandlerContext.java:1071) ~[netty-transport-4.1.67.Final.jar:4.1.67.Final]
at io.netty.util.concurrent.AbstractEventExecutor.safeExecute$$$capture(AbstractEventExecutor.java:164) ~[netty-common-4.1.67.Final.jar:4.1.67.Final]
at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java) ~[netty-common-4.1.67.Final.jar:4.1.67.Final]
at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:469) ~[netty-common-4.1.67.Final.jar:4.1.67.Final]
at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:384) ~[netty-transport-native-epoll-4.1.67.Final-linux-x86_64.jar:4.1.67.Final]
at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:986) ~[netty-common-4.1.67.Final.jar:4.1.67.Final]
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) ~[netty-common-4.1.67.Final.jar:4.1.67.Final]
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) ~[netty-common-4.1.67.Final.jar:4.1.67.Final]
at java.base/java.lang.Thread.run(Thread.java:834) ~[na:na]
2021-11-23 11:57:38.384 DEBUG 362826 --- [ parallel-2] o.s.c.g.h.RoutePredicateHandlerMapping : Route matched: websocket_adapter
2021-11-23 11:57:38.384 DEBUG 362826 --- [ parallel-2] o.s.c.g.h.RoutePredicateHandlerMapping : Mapping [Exchange: POST http://localhost:8080/stream/087/knubrqy0/xhr_streaming?t=1637661458365] to Route{id='websocket_adapter', uri=ws://localhost:8084, order=0, predicate=Paths: [/stream/**], match trailing slash: true, gatewayFilters=[[[DedupeResponseHeader Access-Control-Allow-Credentials Access-Control-Allow-Origin Vary = RETAIN_LAST], order = 1], [com.fathom.services.apigateway.config.StripApiPrefixGatewayFilterFactory$$Lambda$809/0x0000000800633440@76a6511f, order = 2]], metadata={}}
2021-11-23 11:57:38.384 DEBUG 362826 --- [ parallel-2] o.s.c.g.h.RoutePredicateHandlerMapping : [b0a2ea43-2] Mapped to org.springframework.cloud.gateway.handler.FilteringWebHandler@46101e93
2021-11-23 11:57:38.384 DEBUG 362826 --- [ parallel-2] o.s.c.g.handler.FilteringWebHandler : Sorted gatewayFilterFactories: [[GatewayFilterAdapter{delegate=org.springframework.cloud.gateway.filter.RemoveCachedBodyFilter@7ac058a0}, order = -2147483648], [GatewayFilterAdapter{delegate=org.springframework.cloud.gateway.filter.AdaptCachedBodyGlobalFilter@4d81e83a}, order = -2147482648], [GatewayFilterAdapter{delegate=org.springframework.cloud.gateway.filter.NettyWriteResponseFilter@73bb573d}, order = -1], [GatewayFilterAdapter{delegate=org.springframework.cloud.gateway.filter.ForwardPathFilter@49754e74}, order = 0], [[DedupeResponseHeader Access-Control-Allow-Credentials Access-Control-Allow-Origin Vary = RETAIN_LAST], order = 1], [com.fathom.services.apigateway.config.StripApiPrefixGatewayFilterFactory$$Lambda$809/0x0000000800633440@76a6511f, order = 2], [GatewayFilterAdapter{delegate=org.springframework.cloud.gateway.filter.RouteToRequestUrlFilter@736b21ee}, order = 10000], [GatewayFilterAdapter{delegate=org.springframework.cloud.gateway.config.GatewayNoLoadBalancerClientAutoConfiguration$NoLoadBalancerClientFilter@1b46392c}, order = 10150], [GatewayFilterAdapter{delegate=org.springframework.cloud.gateway.filter.WebsocketRoutingFilter@31881aa2}, order = 2147483646], [GatewayFilterAdapter{delegate=org.springframework.cloud.gateway.filter.NettyRoutingFilter@2616b618}, order = 2147483647], [GatewayFilterAdapter{delegate=org.springframework.cloud.gateway.filter.ForwardRoutingFilter@60deefed}, order = 2147483647]]
2021-11-23 11:57:38.386 DEBUG 362826 --- [ parallel-2] a.w.r.e.AbstractErrorWebExceptionHandler : [b0a2ea43-2] Resolved [MethodNotAllowedException: 405 METHOD_NOT_ALLOWED "Request method 'POST' not supported"] for HTTP POST /stream/087/knubrqy0/xhr_streaming
2021-11-23 11:57:38.461 DEBUG 362826 --- [ parallel-1] o.s.c.g.h.RoutePredicateHandlerMapping : Route matched: websocket_adapter
2021-11-23 11:57:38.461 DEBUG 362826 --- [ parallel-1] o.s.c.g.h.RoutePredicateHandlerMapping : Mapping [Exchange: GET http://localhost:8080/stream/087/iecyjgc4/eventsource] to Route{id='websocket_adapter', uri=ws://localhost:8084, order=0, predicate=Paths: [/stream/**], match trailing slash: true, gatewayFilters=[[[DedupeResponseHeader Access-Control-Allow-Credentials Access-Control-Allow-Origin Vary = RETAIN_LAST], order = 1], [com.fathom.services.apigateway.config.StripApiPrefixGatewayFilterFactory$$Lambda$809/0x0000000800633440@76a6511f, order = 2]], metadata={}}
2021-11-23 11:57:38.461 DEBUG 362826 --- [ parallel-1] o.s.c.g.h.RoutePredicateHandlerMapping : [57ebfca2-1] Mapped to org.springframework.cloud.gateway.handler.FilteringWebHandler@46101e93
2021-11-23 11:57:38.461 DEBUG 362826 --- [ parallel-1] o.s.c.g.handler.FilteringWebHandler : Sorted gatewayFilterFactories: [[GatewayFilterAdapter{delegate=org.springframework.cloud.gateway.filter.RemoveCachedBodyFilter@7ac058a0}, order = -2147483648], [GatewayFilterAdapter{delegate=org.springframework.cloud.gateway.filter.AdaptCachedBodyGlobalFilter@4d81e83a}, order = -2147482648], [GatewayFilterAdapter{delegate=org.springframework.cloud.gateway.filter.NettyWriteResponseFilter@73bb573d}, order = -1], [GatewayFilterAdapter{delegate=org.springframework.cloud.gateway.filter.ForwardPathFilter@49754e74}, order = 0], [[DedupeResponseHeader Access-Control-Allow-Credentials Access-Control-Allow-Origin Vary = RETAIN_LAST], order = 1], [com.fathom.services.apigateway.config.StripApiPrefixGatewayFilterFactory$$Lambda$809/0x0000000800633440@76a6511f, order = 2], [GatewayFilterAdapter{delegate=org.springframework.cloud.gateway.filter.RouteToRequestUrlFilter@736b21ee}, order = 10000], [GatewayFilterAdapter{delegate=org.springframework.cloud.gateway.config.GatewayNoLoadBalancerClientAutoConfiguration$NoLoadBalancerClientFilter@1b46392c}, order = 10150], [GatewayFilterAdapter{delegate=org.springframework.cloud.gateway.filter.WebsocketRoutingFilter@31881aa2}, order = 2147483646], [GatewayFilterAdapter{delegate=org.springframework.cloud.gateway.filter.NettyRoutingFilter@2616b618}, order = 2147483647], [GatewayFilterAdapter{delegate=org.springframework.cloud.gateway.filter.ForwardRoutingFilter@60deefed}, order = 2147483647]]
2021-11-23 11:57:38.466 DEBUG 362826 --- [ parallel-1] a.w.r.e.AbstractErrorWebExceptionHandler : [57ebfca2-1] Resolved [ServerWebInputException: 400 BAD_REQUEST "Invalid 'Upgrade' header: [Host:"localhost:8080", Connection:"keep-alive", Pragma:"no-cache", Cache-Control:"no-cache", sec-ch-ua:""Chromium";v="94", "Google Chrome";v="94", ";Not A Brand";v="99"", Accept:"text/event-stream", sec-ch-ua-mobile:"?0", User-Agent:"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.81 Safari/537.36", sec-ch-ua-platform:""Linux"", Origin:"http://localhost:4200", Sec-Fetch-Site:"same-site", Sec-Fetch-Mode:"cors", Sec-Fetch-Dest:"empty", Referer:"http://localhost:4200/", Accept-Encoding:"gzip, deflate, br", Accept-Language:"en-US,en;q=0.9,uk;q=0.8"]"] for HTTP GET /stream/087/iecyjgc4/eventsource
2021-11-23 11:57:38.733 DEBUG 362826 --- [ parallel-3] o.s.c.g.h.RoutePredicateHandlerMapping : Route matched: websocket_adapter
2021-11-23 11:57:38.733 DEBUG 362826 --- [ parallel-3] o.s.c.g.h.RoutePredicateHandlerMapping : Mapping [Exchange: GET http://localhost:8080/stream/iframe.html] to Route{id='websocket_adapter', uri=ws://localhost:8084, order=0, predicate=Paths: [/stream/**], match trailing slash: true, gatewayFilters=[[[DedupeResponseHeader Access-Control-Allow-Credentials Access-Control-Allow-Origin Vary = RETAIN_LAST], order = 1], [com.fathom.services.apigateway.config.StripApiPrefixGatewayFilterFactory$$Lambda$809/0x0000000800633440@76a6511f, order = 2]], metadata={}}
2021-11-23 11:57:38.733 DEBUG 362826 --- [ parallel-3] o.s.c.g.h.RoutePredicateHandlerMapping : [b0a2ea43-3] Mapped to org.springframework.cloud.gateway.handler.FilteringWebHandler@46101e93
2021-11-23 11:57:38.733 DEBUG 362826 --- [ parallel-3] o.s.c.g.handler.FilteringWebHandler : Sorted gatewayFilterFactories: [[GatewayFilterAdapter{delegate=org.springframework.cloud.gateway.filter.RemoveCachedBodyFilter@7ac058a0}, order = -2147483648], [GatewayFilterAdapter{delegate=org.springframework.cloud.gateway.filter.AdaptCachedBodyGlobalFilter@4d81e83a}, order = -2147482648], [GatewayFilterAdapter{delegate=org.springframework.cloud.gateway.filter.NettyWriteResponseFilter@73bb573d}, order = -1], [GatewayFilterAdapter{delegate=org.springframework.cloud.gateway.filter.ForwardPathFilter@49754e74}, order = 0], [[DedupeResponseHeader Access-Control-Allow-Credentials Access-Control-Allow-Origin Vary = RETAIN_LAST], order = 1], [com.fathom.services.apigateway.config.StripApiPrefixGatewayFilterFactory$$Lambda$809/0x0000000800633440@76a6511f, order = 2], [GatewayFilterAdapter{delegate=org.springframework.cloud.gateway.filter.RouteToRequestUrlFilter@736b21ee}, order = 10000], [GatewayFilterAdapter{delegate=org.springframework.cloud.gateway.config.GatewayNoLoadBalancerClientAutoConfiguration$NoLoadBalancerClientFilter@1b46392c}, order = 10150], [GatewayFilterAdapter{delegate=org.springframework.cloud.gateway.filter.WebsocketRoutingFilter@31881aa2}, order = 2147483646], [GatewayFilterAdapter{delegate=org.springframework.cloud.gateway.filter.NettyRoutingFilter@2616b618}, order = 2147483647], [GatewayFilterAdapter{delegate=org.springframework.cloud.gateway.filter.ForwardRoutingFilter@60deefed}, order = 2147483647]]
2021-11-23 11:57:38.743 DEBUG 362826 --- [ parallel-3] a.w.r.e.AbstractErrorWebExceptionHandler : [b0a2ea43-3] Resolved [ServerWebInputException: 400 BAD_REQUEST "Invalid 'Upgrade' header: [Host:"localhost:8080", Connection:"keep-alive", Pragma:"no-cache", Cache-Control:"no-cache", sec-ch-ua:""Chromium";v="94", "Google Chrome";v="94", ";Not A Brand";v="99"", sec-ch-ua-mobile:"?0", sec-ch-ua-platform:""Linux"", Upgrade-Insecure-Requests:"1", User-Agent:"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.81 Safari/537.36", Accept:"text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9", Sec-Fetch-Site:"same-site", Sec-Fetch-Mode:"navigate", Sec-Fetch-Dest:"iframe", Referer:"http://localhost:4200/", Accept-Encoding:"gzip, deflate, br", Accept-Language:"en-US,en;q=0.9,uk;q=0.8", Cookie:"Webstorm-8ed24b40=b9b492bc-8c52-42e6-b64e-75ea318a716e; wordpress_test_cookie=WP%20Cookie%20check; tk_ai=woo%3ApQWZgqJqTqr5MWqoojqYTQOj; wp-settings-1=libraryContent%3Dbrowse%26editor%3Dtinymce%26mfold%3Do; wp-settings-time-1=1625056124; woocommerce_recently_viewed=222%7C219%7C223; wordpress_logged_in_86a9106ae65537651a8e456835b316ab=Arnold%7C1627799530%7CyHM7440cTG6xaHs9g9NaU94UAZjSkvgfbV1xJIhaaFq%7C84099ca4968ea4aa3e77b0ff8ce1b231dbeffcba5de3655b3a95816a143cb60a; sid=Fe26.2**558d093949154a1964659295b70990d478bac388cfc040029021645761c5b0c9*0yr6iLdR0GOLUjzoQ6QHNA*mKNTZCy_TNwHkrZUSv2l4qmcX2xZBtNboG48S7Z7ssSboBb8BKDeJF3MgkjSBlLiei-grFQLluJV83p4qZCaLIj7YXmQPubGwliIEpo3QEVN2MutsAQAALmJ-mN4bQDqZ-1XIijjMWzK3WN4hzUzARTL58VXLQ1WdcbnOjnqarImDshPEmirHbi1AwbZZvE3sw7t7vUgRdrKiMuq3y612VoWsnQmzJmggAhfRc6DElM**4821625b69700112b2afe0514226043e12719a568eee74164a106b7db85e72f5*xGaRfeMoPqXX7Zi2f7ZmA_V4vcfcWssbv-WklcQbfm8; JSESSIONID=A64CF4BEC2A64F96A7750C7D3C028D8B"]"] for HTTP GET /stream/iframe.html
2021-11-23 11:57:40.767 DEBUG 362826 --- [ parallel-4] o.s.c.g.h.RoutePredicateHandlerMapping : Route matched: websocket_adapter
2021-11-23 11:57:40.768 DEBUG 362826 --- [ parallel-4] o.s.c.g.h.RoutePredicateHandlerMapping : Mapping [Exchange: GET http://localhost:8080/stream/iframe.html] to Route{id='websocket_adapter', uri=ws://localhost:8084, order=0, predicate=Paths: [/stream/**], match trailing slash: true, gatewayFilters=[[[DedupeResponseHeader Access-Control-Allow-Credentials Access-Control-Allow-Origin Vary = RETAIN_LAST], order = 1], [com.fathom.services.apigateway.config.StripApiPrefixGatewayFilterFactory$$Lambda$809/0x0000000800633440@76a6511f, order = 2]], metadata={}}
2021-11-23 11:57:40.768 DEBUG 362826 --- [ parallel-4] o.s.c.g.h.RoutePredicateHandlerMapping : [b0a2ea43-4] Mapped to org.springframework.cloud.gateway.handler.FilteringWebHandler@46101e93
2021-11-23 11:57:40.768 DEBUG 362826 --- [ parallel-4] o.s.c.g.handler.FilteringWebHandler : Sorted gatewayFilterFactories: [[GatewayFilterAdapter{delegate=org.springframework.cloud.gateway.filter.RemoveCachedBodyFilter@7ac058a0}, order = -2147483648], [GatewayFilterAdapter{delegate=org.springframework.cloud.gateway.filter.AdaptCachedBodyGlobalFilter@4d81e83a}, order = -2147482648], [GatewayFilterAdapter{delegate=org.springframework.cloud.gateway.filter.NettyWriteResponseFilter@73bb573d}, order = -1], [GatewayFilterAdapter{delegate=org.springframework.cloud.gateway.filter.ForwardPathFilter@49754e74}, order = 0], [[DedupeResponseHeader Access-Control-Allow-Credentials Access-Control-Allow-Origin Vary = RETAIN_LAST], order = 1], [com.fathom.services.apigateway.config.StripApiPrefixGatewayFilterFactory$$Lambda$809/0x0000000800633440@76a6511f, order = 2], [GatewayFilterAdapter{delegate=org.springframework.cloud.gateway.filter.RouteToRequestUrlFilter@736b21ee}, order = 10000], [GatewayFilterAdapter{delegate=org.springframework.cloud.gateway.config.GatewayNoLoadBalancerClientAutoConfiguration$NoLoadBalancerClientFilter@1b46392c}, order = 10150], [GatewayFilterAdapter{delegate=org.springframework.cloud.gateway.filter.WebsocketRoutingFilter@31881aa2}, order = 2147483646], [GatewayFilterAdapter{delegate=org.springframework.cloud.gateway.filter.NettyRoutingFilter@2616b618}, order = 2147483647], [GatewayFilterAdapter{delegate=org.springframework.cloud.gateway.filter.ForwardRoutingFilter@60deefed}, order = 2147483647]]
2021-11-23 11:57:40.772 DEBUG 362826 --- [ parallel-4] a.w.r.e.AbstractErrorWebExceptionHandler : [b0a2ea43-4] Resolved [ServerWebInputException: 400 BAD_REQUEST "Invalid 'Upgrade' header: [Host:"localhost:8080", Connection:"keep-alive", Pragma:"no-cache", Cache-Control:"no-cache", sec-ch-ua:""Chromium";v="94", "Google Chrome";v="94", ";Not A Brand";v="99"", sec-ch-ua-mobile:"?0", sec-ch-ua-platform:""Linux"", Upgrade-Insecure-Requests:"1", User-Agent:"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.81 Safari/537.36", Accept:"text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9", Sec-Fetch-Site:"same-site", Sec-Fetch-Mode:"navigate", Sec-Fetch-Dest:"iframe", Referer:"http://localhost:4200/", Accept-Encoding:"gzip, deflate, br", Accept-Language:"en-US,en;q=0.9,uk;q=0.8", Cookie:"Webstorm-8ed24b40=b9b492bc-8c52-42e6-b64e-75ea318a716e; wordpress_test_cookie=WP%20Cookie%20check; tk_ai=woo%3ApQWZgqJqTqr5MWqoojqYTQOj; wp-settings-1=libraryContent%3Dbrowse%26editor%3Dtinymce%26mfold%3Do; wp-settings-time-1=1625056124; woocommerce_recently_viewed=222%7C219%7C223; wordpress_logged_in_86a9106ae65537651a8e456835b316ab=Arnold%7C1627799530%7CyHM7440cTG6xaHs9g9NaU94UAZjSkvgfbV1xJIhaaFq%7C84099ca4968ea4aa3e77b0ff8ce1b231dbeffcba5de3655b3a95816a143cb60a; sid=Fe26.2**558d093949154a1964659295b70990d478bac388cfc040029021645761c5b0c9*0yr6iLdR0GOLUjzoQ6QHNA*mKNTZCy_TNwHkrZUSv2l4qmcX2xZBtNboG48S7Z7ssSboBb8BKDeJF3MgkjSBlLiei-grFQLluJV83p4qZCaLIj7YXmQPubGwliIEpo3QEVN2MutsAQAALmJ-mN4bQDqZ-1XIijjMWzK3WN4hzUzARTL58VXLQ1WdcbnOjnqarImDshPEmirHbi1AwbZZvE3sw7t7vUgRdrKiMuq3y612VoWsnQmzJmggAhfRc6DElM**4821625b69700112b2afe0514226043e12719a568eee74164a106b7db85e72f5*xGaRfeMoPqXX7Zi2f7ZmA_V4vcfcWssbv-WklcQbfm8; JSESSIONID=A64CF4BEC2A64F96A7750C7D3C028D8B"]"] for HTTP GET /stream/iframe.html
2021-11-23 11:57:40.845 DEBUG 362826 --- [ parallel-5] o.s.c.g.h.RoutePredicateHandlerMapping : Route matched: websocket_adapter
2021-11-23 11:57:40.845 DEBUG 362826 --- [ parallel-5] o.s.c.g.h.RoutePredicateHandlerMapping : Mapping [Exchange: GET http://localhost:8080/stream/iframe.html] to Route{id='websocket_adapter', uri=ws://localhost:8084, order=0, predicate=Paths: [/stream/**], match trailing slash: true, gatewayFilters=[[[DedupeResponseHeader Access-Control-Allow-Credentials Access-Control-Allow-Origin Vary = RETAIN_LAST], order = 1], [com.fathom.services.apigateway.config.StripApiPrefixGatewayFilterFactory$$Lambda$809/0x0000000800633440@76a6511f, order = 2]], metadata={}}
2021-11-23 11:57:40.845 DEBUG 362826 --- [ parallel-5] o.s.c.g.h.RoutePredicateHandlerMapping : [b0a2ea43-5] Mapped to org.springframework.cloud.gateway.handler.FilteringWebHandler@46101e93
2021-11-23 11:57:40.845 DEBUG 362826 --- [ parallel-5] o.s.c.g.handler.FilteringWebHandler : Sorted gatewayFilterFactories: [[GatewayFilterAdapter{delegate=org.springframework.cloud.gateway.filter.RemoveCachedBodyFilter@7ac058a0}, order = -2147483648], [GatewayFilterAdapter{delegate=org.springframework.cloud.gateway.filter.AdaptCachedBodyGlobalFilter@4d81e83a}, order = -2147482648], [GatewayFilterAdapter{delegate=org.springframework.cloud.gateway.filter.NettyWriteResponseFilter@73bb573d}, order = -1], [GatewayFilterAdapter{delegate=org.springframework.cloud.gateway.filter.ForwardPathFilter@49754e74}, order = 0], [[DedupeResponseHeader Access-Control-Allow-Credentials Access-Control-Allow-Origin Vary = RETAIN_LAST], order = 1], [com.fathom.services.apigateway.config.StripApiPrefixGatewayFilterFactory$$Lambda$809/0x0000000800633440@76a6511f, order = 2], [GatewayFilterAdapter{delegate=org.springframework.cloud.gateway.filter.RouteToRequestUrlFilter@736b21ee}, order = 10000], [GatewayFilterAdapter{delegate=org.springframework.cloud.gateway.config.GatewayNoLoadBalancerClientAutoConfiguration$NoLoadBalancerClientFilter@1b46392c}, order = 10150], [GatewayFilterAdapter{delegate=org.springframework.cloud.gateway.filter.WebsocketRoutingFilter@31881aa2}, order = 2147483646], [GatewayFilterAdapter{delegate=org.springframework.cloud.gateway.filter.NettyRoutingFilter@2616b618}, order = 2147483647], [GatewayFilterAdapter{delegate=org.springframework.cloud.gateway.filter.ForwardRoutingFilter@60deefed}, order = 2147483647]]
2021-11-23 11:57:40.849 DEBUG 362826 --- [ parallel-5] a.w.r.e.AbstractErrorWebExceptionHandler : [b0a2ea43-5] Resolved [ServerWebInputException: 400 BAD_REQUEST "Invalid 'Upgrade' header: [Host:"localhost:8080", Connection:"keep-alive", Pragma:"no-cache", Cache-Control:"no-cache", sec-ch-ua:""Chromium";v="94", "Google Chrome";v="94", ";Not A Brand";v="99"", sec-ch-ua-mobile:"?0", sec-ch-ua-platform:""Linux"", Upgrade-Insecure-Requests:"1", User-Agent:"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.81 Safari/537.36", Accept:"text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9", Sec-Fetch-Site:"same-site", Sec-Fetch-Mode:"navigate", Sec-Fetch-Dest:"iframe", Referer:"http://localhost:4200/", Accept-Encoding:"gzip, deflate, br", Accept-Language:"en-US,en;q=0.9,uk;q=0.8", Cookie:"Webstorm-8ed24b40=b9b492bc-8c52-42e6-b64e-75ea318a716e; wordpress_test_cookie=WP%20Cookie%20check; tk_ai=woo%3ApQWZgqJqTqr5MWqoojqYTQOj; wp-settings-1=libraryContent%3Dbrowse%26editor%3Dtinymce%26mfold%3Do; wp-settings-time-1=1625056124; woocommerce_recently_viewed=222%7C219%7C223; wordpress_logged_in_86a9106ae65537651a8e456835b316ab=Arnold%7C1627799530%7CyHM7440cTG6xaHs9g9NaU94UAZjSkvgfbV1xJIhaaFq%7C84099ca4968ea4aa3e77b0ff8ce1b231dbeffcba5de3655b3a95816a143cb60a; sid=Fe26.2**558d093949154a1964659295b70990d478bac388cfc040029021645761c5b0c9*0yr6iLdR0GOLUjzoQ6QHNA*mKNTZCy_TNwHkrZUSv2l4qmcX2xZBtNboG48S7Z7ssSboBb8BKDeJF3MgkjSBlLiei-grFQLluJV83p4qZCaLIj7YXmQPubGwliIEpo3QEVN2MutsAQAALmJ-mN4bQDqZ-1XIijjMWzK3WN4hzUzARTL58VXLQ1WdcbnOjnqarImDshPEmirHbi1AwbZZvE3sw7t7vUgRdrKiMuq3y612VoWsnQmzJmggAhfRc6DElM**4821625b69700112b2afe0514226043e12719a568eee74164a106b7db85e72f5*xGaRfeMoPqXX7Zi2f7ZmA_V4vcfcWssbv-WklcQbfm8; JSESSIONID=A64CF4BEC2A64F96A7750C7D3C028D8B"]"] for HTTP GET /stream/iframe.html
2021-11-23 11:57:40.939 DEBUG 362826 --- [ parallel-6] o.s.c.g.h.RoutePredicateHandlerMapping : Route matched: websocket_adapter
2021-11-23 11:57:40.939 DEBUG 362826 --- [ parallel-6] o.s.c.g.h.RoutePredicateHandlerMapping : Mapping [Exchange: POST http://localhost:8080/stream/087/mbxftqti/xhr?t=1637661460910] to Route{id='websocket_adapter', uri=ws://localhost:8084, order=0, predicate=Paths: [/stream/**], match trailing slash: true, gatewayFilters=[[[DedupeResponseHeader Access-Control-Allow-Credentials Access-Control-Allow-Origin Vary = RETAIN_LAST], order = 1], [com.fathom.services.apigateway.config.StripApiPrefixGatewayFilterFactory$$Lambda$809/0x0000000800633440@76a6511f, order = 2]], metadata={}}
2021-11-23 11:57:40.939 DEBUG 362826 --- [ parallel-6] o.s.c.g.h.RoutePredicateHandlerMapping : [b0a2ea43-6] Mapped to org.springframework.cloud.gateway.handler.FilteringWebHandler@46101e93
2021-11-23 11:57:40.939 DEBUG 362826 --- [ parallel-6] o.s.c.g.handler.FilteringWebHandler : Sorted gatewayFilterFactories: [[GatewayFilterAdapter{delegate=org.springframework.cloud.gateway.filter.RemoveCachedBodyFilter@7ac058a0}, order = -2147483648], [GatewayFilterAdapter{delegate=org.springframework.cloud.gateway.filter.AdaptCachedBodyGlobalFilter@4d81e83a}, order = -2147482648], [GatewayFilterAdapter{delegate=org.springframework.cloud.gateway.filter.NettyWriteResponseFilter@73bb573d}, order = -1], [GatewayFilterAdapter{delegate=org.springframework.cloud.gateway.filter.ForwardPathFilter@49754e74}, order = 0], [[DedupeResponseHeader Access-Control-Allow-Credentials Access-Control-Allow-Origin Vary = RETAIN_LAST], order = 1], [com.fathom.services.apigateway.config.StripApiPrefixGatewayFilterFactory$$Lambda$809/0x0000000800633440@76a6511f, order = 2], [GatewayFilterAdapter{delegate=org.springframework.cloud.gateway.filter.RouteToRequestUrlFilter@736b21ee}, order = 10000], [GatewayFilterAdapter{delegate=org.springframework.cloud.gateway.config.GatewayNoLoadBalancerClientAutoConfiguration$NoLoadBalancerClientFilter@1b46392c}, order = 10150], [GatewayFilterAdapter{delegate=org.springframework.cloud.gateway.filter.WebsocketRoutingFilter@31881aa2}, order = 2147483646], [GatewayFilterAdapter{delegate=org.springframework.cloud.gateway.filter.NettyRoutingFilter@2616b618}, order = 2147483647], [GatewayFilterAdapter{delegate=org.springframework.cloud.gateway.filter.ForwardRoutingFilter@60deefed}, order = 2147483647]]
2021-11-23 11:57:40.941 DEBUG 362826 --- [ parallel-6] a.w.r.e.AbstractErrorWebExceptionHandler : [b0a2ea43-6] Resolved [MethodNotAllowedException: 405 METHOD_NOT_ALLOWED "Request method 'POST' not supported"] for HTTP POST /stream/087/mbxftqti/xhr
2021-11-23 11:57:42.275 DEBUG 362826 --- [ parallel-7] o.s.c.g.h.RoutePredicateHandlerMapping : Route matched: websocket_adapter
The following request fails:
curl 'http://localhost:8080/stream/440/uh54ad23/xhr_streaming?t=1637663352577' -H 'User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0' -H 'Accept: */*' -H 'Accept-Language: en-US,en;q=0.5' --compressed -H 'Origin: http://localhost:4200' -H 'Connection: keep-alive' -H 'Referer: http://localhost:4200/well-status/9748924b-ca6e-4a30-b144-87e3fff47d2b?assetId=9748924b-ca6e-4a30-b144-87e3fff47d2b&assetType=well.esp&orgId=422244f4-9ecd-48cc-aca4-f4bb6d900472'
With this response:
{"timestamp":"2021-11-23T10:29:12.587+00:00","path":"/stream/440/uh54ad23/xhr_streaming","status":405,"error":"Method Not Allowed","message":"Request method 'POST' not supported","requestId":"2dadd0af-14"}
Also request http://localhost:8080/stream/440/jjj1xv4q/eventsource fails with 400 Bad Request

I tried to leave removed hop-by-hop header Upgrade , but still doesn't work.
ApiGateway match /stream socket connection to the ws scheme and looks like some of the requests connected to the sockjs are also located on /stream endpoint. So they are redirected to the ws scheme as well.
I wonder if there a way to overcome the issue described above. Thank you in advance.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the route configuration for /stream/info/** and /stream/** and the Gateway logs for the SockJS requests. Read WebsocketRoutingFilter and DedupeResponseHeaderGatewayFilterFactory, especially the failing dedupe call at line 144. Done means SockJS and WebSocket requests can pass through the gateway without the reported 405, 400, header, or committed-response errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, spring, spring-boot
- Domain
- api, backend, networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100