Skip to content

Commit

Permalink
kishida
Browse files Browse the repository at this point in the history
  • Loading branch information
tako0614 authored Jun 19, 2024
1 parent f085087 commit b438437
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion islands/Chats/Chat.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,9 @@ export default function Home(
} else {
wssprotocol = "ws://"
}
const wsurl = wssprotocol + "/api/v1/main"
const origin = window.location.origin;
const domain = (new URL(origin)).hostname;
const wsurl = wssprotocol + domain + "/api/v1/main"
const socket = new WebSocket(
wsurl
)
Expand Down

0 comments on commit b438437

Please sign in to comment.