Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
YeonV committed Jan 14, 2025
1 parent 2897e6c commit 4af6f9c
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/utils/Websocket.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,14 @@ function createSocket() {
host.replace('https://', 'wss://').replace('http://', 'ws://') +
'/api/websocket'

if (YZFLAG) {
return 'mixedContent'
}
if (window.location.protocol === 'https:' && wsUrl.startsWith('ws://')) {
console.warn(
'Mixed content error: Cannot connect to ws:// from an https:// page.'
)
return undefined
}

if (YZFLAG) {
return 'mixedContent'
// return undefined
}

try {
Expand Down

0 comments on commit 4af6f9c

Please sign in to comment.