Fix WebSocket CORS configs for trailing slashes
Related to https://github.com/spring-projects/spring-framework/issues/26892 The WebSocket tests with `allowedOrigins` fail now because CORS processor in Spring Framework removes a trailing slash from the request where possible one in the config is left as is. * Remove the trailing slash from the CORS config to match the current SF behavior
This commit is contained in:
@@ -318,7 +318,7 @@ public class StompInboundChannelAdapterWebSocketIntegrationTests {
|
||||
public void registerStompEndpoints(StompEndpointRegistry registry) {
|
||||
registry.addEndpoint("/ws")
|
||||
.setHandshakeHandler(handshakeHandler())
|
||||
.setAllowedOrigins("https://www.example.com/")
|
||||
.setAllowedOrigins("https://www.example.com")
|
||||
.addInterceptors(new HandshakeInterceptor() {
|
||||
|
||||
@Override
|
||||
|
||||
@@ -263,7 +263,7 @@ public class WebSocketServerTests {
|
||||
return new ServerWebSocketContainer("/ws")
|
||||
.setHandshakeHandler(handshakeHandler())
|
||||
.setDecoratorFactories(testWebSocketHandlerDecoratorFactory())
|
||||
.setAllowedOrigins("https://www.example.com/")
|
||||
.setAllowedOrigins("https://www.example.com")
|
||||
.withSockJs();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user