앱 실시간 갱신 수정

This commit is contained in:
Macbook
2026-06-14 19:41:49 +09:00
parent c105ae209b
commit ad6347f2a2
9 changed files with 71 additions and 39 deletions
+10
View File
@@ -101,6 +101,16 @@ export function getStompSockJsUrl(): string {
return `${secureOrigin}/api/ws/trading`;
}
/**
* Desktop Tauri — SockJS 없이 순수 WebSocket STOMP (/ws/trading/ws).
* cross-origin WebView에서 SockJS 세션·쿠키가 막히므로 Desktop 전용.
*/
export function getStompNativeWebSocketUrl(): string {
const secureOrigin = getSecureApiOrigin().replace(/^http:\/\//i, 'https://');
const wsOrigin = secureOrigin.replace(/^https:\/\//i, 'wss://');
return `${wsOrigin}/api/ws/trading/ws`;
}
// UUID 생성 — HTTPS/localhost: crypto.randomUUID() 사용, HTTP: 폴리필
function generateUUID(): string {
if (typeof crypto !== 'undefined' && typeof crypto.randomUUID === 'function') {