Skip to content

Commit

Permalink
fix(AdminUI/Websocket): Fix Websocket secure
Browse files Browse the repository at this point in the history
  • Loading branch information
Gozzim committed May 13, 2022
1 parent 367e4db commit 1925259
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import { useEffect, useState } from 'react'
import { DeployStatus } from 'deployment-server/dist/src'

const createWebsocket = async (route: string): Promise<WebSocket> => {
const url = `${window.location.protocol === 'https' ? 'wss' : 'ws'}://${window.location.host}${route}`
const url = `${window.location.protocol === 'https:' ? 'wss' : 'ws'}://${window.location.host}${route}`
return new WebSocket(url)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export interface ServerMessage {
}

const createWebsocket = async (route: string): Promise<WebSocket> => {
const url = `${window.location.protocol === 'https' ? 'wss' : 'ws'}://${window.location.host}${route}`
const url = `${window.location.protocol === 'https:' ? 'wss' : 'ws'}://${window.location.host}${route}`
return new WebSocket(url)
}

Expand Down

0 comments on commit 1925259

Please sign in to comment.