Skip to content

Commit

Permalink
🐛 修复丢失的host
Browse files Browse the repository at this point in the history
  • Loading branch information
evil0th authored and Hccake committed Mar 5, 2024
1 parent dd2ea04 commit b2753e0
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/hooks/websocket.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ const useAdminWebSocket = () => {

// ws地址
const baseUri = import.meta.env.VITE_API_URL
const host = window.location.host
const protocol = window.location.protocol || ''
const wsUri = `${protocol.startsWith('https') ? 'wss' : 'ws'}://${host}${baseUri}/ws?access_token=${accessToken}`

Expand Down

0 comments on commit b2753e0

Please sign in to comment.