Fix CORS configuration issue introduced in Spring 5.3
This commit is contained in:
parent
215a646fde
commit
93376eef5e
@ -55,7 +55,7 @@ public class WebSocketConfiguration implements WebSocketConfigurer {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void registerWebSocketHandlers(WebSocketHandlerRegistry registry) {
|
public void registerWebSocketHandlers(WebSocketHandlerRegistry registry) {
|
||||||
registry.addHandler(wsHandler(), WS_PLUGIN_MAPPING).setAllowedOrigins("*")
|
registry.addHandler(wsHandler(), WS_PLUGIN_MAPPING).setAllowedOriginPatterns("*")
|
||||||
.addInterceptors(new HttpSessionHandshakeInterceptor(), new HandshakeInterceptor() {
|
.addInterceptors(new HttpSessionHandshakeInterceptor(), new HandshakeInterceptor() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@ -492,7 +492,7 @@ spring.mvc.cors:
|
|||||||
# Intercept path
|
# Intercept path
|
||||||
"[/api/**]":
|
"[/api/**]":
|
||||||
#Comma-separated list of origins to allow. '*' allows all origins. When not set,CORS support is disabled.
|
#Comma-separated list of origins to allow. '*' allows all origins. When not set,CORS support is disabled.
|
||||||
allowed-origins: "*"
|
allowed-origin-patterns: "*"
|
||||||
#Comma-separated list of methods to allow. '*' allows all methods.
|
#Comma-separated list of methods to allow. '*' allows all methods.
|
||||||
allowed-methods: "*"
|
allowed-methods: "*"
|
||||||
#Comma-separated list of headers to allow in a request. '*' allows all headers.
|
#Comma-separated list of headers to allow in a request. '*' allows all headers.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user