fix(socket): SockJS 생성자에 wss:// 대신 https:// 전달 (실시간 연결 복구) - #38
Merged
Conversation
- new SockJS(ENV.WS_URL) 에 wss://... 가 그대로 전달돼 연결 실패 → SockJS 는 http(s) 베이스 URL 필요 - toSockJsUrl 로 wss→https, ws→http 변환 후 전달 (NEXT_PUBLIC_WS_URL 환경변수는 그대로 유지) - 서버 SockJS 엔드포인트(/ws/info)는 https 200·websocket:true 로 정상 확인됨
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
증상
실시간(문제 수신·참가자 목록·시작 전환 등)이 동작하지 않음.
원인
new SockJS(ENV.WS_URL)에 주입된wss://144-24-92-17.sslip.io/ws가 그대로 전달됨. SockJS 생성자는 http(s) 베이스 URL 을 기대하므로wss://는 연결 실패.GET https://.../ws/info→ 200,{"websocket":true}수정
toSockJsUrl()로wss→https,ws→http변환 후 SockJS 에 전달.NEXT_PUBLIC_WS_URL환경변수는 그대로 둠.pnpm tsc --noEmit✅ ·pnpm build✅