POLISHING STUFF and Smarter AI, and alot i mean.. ALOT OF BUG FIX AND OPTIMIZE
This commit is contained in:
@@ -36,11 +36,14 @@ public class WebSocketConfig implements WebSocketMessageBrokerConfigurer {
|
||||
|
||||
@Override
|
||||
public void registerStompEndpoints(StompEndpointRegistry registry) {
|
||||
// Endpoint WebSocket utama
|
||||
// Endpoint WebSocket utama untuk Flutter/stomp_dart_client.
|
||||
// Flutter connect ke: ws://host:port/ws (tanpa SockJS)
|
||||
// Browser/Postman bisa pakai SockJS fallback: http://host:port/ws
|
||||
registry.addEndpoint("/ws")
|
||||
.setAllowedOriginPatterns("*") // Allow semua origin untuk testing HP di LAN
|
||||
.withSockJS(); // SockJS fallback untuk browser compatibility
|
||||
.setAllowedOriginPatterns("*"); // Allow semua origin untuk testing HP di LAN
|
||||
|
||||
// Endpoint fallback SockJS untuk browser tooling bila dibutuhkan.
|
||||
registry.addEndpoint("/ws-sockjs")
|
||||
.setAllowedOriginPatterns("*")
|
||||
.withSockJS();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user