File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed
backend/src/main/java/com/deliveranything/global/config Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change 2727import org .springframework .messaging .support .ChannelInterceptor ;
2828import org .springframework .messaging .support .MessageHeaderAccessor ;
2929import org .springframework .security .authentication .UsernamePasswordAuthenticationToken ;
30+ import org .springframework .security .config .annotation .web .socket .EnableWebSocketSecurity ;
3031import org .springframework .security .core .Authentication ;
3132import org .springframework .security .core .GrantedAuthority ;
3233import org .springframework .security .core .userdetails .UserDetails ;
3738@ Slf4j
3839@ Configuration
3940@ EnableWebSocketMessageBroker
41+ @ EnableWebSocketSecurity
4042@ RequiredArgsConstructor
4143public class WebSocketConfig implements WebSocketMessageBrokerConfigurer {
4244
@@ -50,12 +52,7 @@ public class WebSocketConfig implements WebSocketMessageBrokerConfigurer {
5052 public void registerStompEndpoints (StompEndpointRegistry registry ) {
5153 registry .setErrorHandler (stompErrorHandler );
5254 registry .addEndpoint ("/ws" )
53- .setAllowedOriginPatterns ("http://localhost:*" ,
54- "https://localhost:*" ,
55- "https://cdpn.io" ,
56- "https://www.deliver-anything.shop" ,
57- "https://api.deliver-anything.shop"
58- )
55+ .setAllowedOriginPatterns ("*" )
5956 .withSockJS ();
6057 }
6158
You can’t perform that action at this time.
0 commit comments