mirror of
https://github.com/nagisa77/OpenIsle.git
synced 2026-02-19 05:21:15 +08:00
fix: 修复nginx /ws拦截问题
This commit is contained in:
@@ -41,8 +41,7 @@ public class WebSocketConfig implements WebSocketMessageBrokerConfigurer {
|
||||
|
||||
@Override
|
||||
public void registerStompEndpoints(StompEndpointRegistry registry) {
|
||||
// Registers the "/ws" endpoint, enabling SockJS fallback options so that alternate transports may be used if WebSocket is not available.
|
||||
registry.addEndpoint("/ws")
|
||||
registry.addEndpoint("/api/ws")
|
||||
// 安全改进:使用具体的允许源,而不是通配符
|
||||
.setAllowedOrigins(
|
||||
"http://127.0.0.1:8080",
|
||||
|
||||
Reference in New Issue
Block a user