Skip to content

Commit

Permalink
yes
Browse files Browse the repository at this point in the history
  • Loading branch information
tako0614 authored Jun 19, 2024
1 parent 5823a44 commit f085087
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion islands/Chats/Chat.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,12 @@ export default function Home(
}, [talkData])
useEffect(() => {
const createWebSocket = () => {
const wssprotocol = props.wsSSL ? "wss://" : "ws://"
let wssprotocol
if (window.location.protocol === 'https:') {
wssprotocol = "wss://"
} else {
wssprotocol = "ws://"
}
const wsurl = wssprotocol + "/api/v1/main"
const socket = new WebSocket(
wsurl
Expand Down

0 comments on commit f085087

Please sign in to comment.