import createNydus from 'nydus-client'

const location = window.location
const protocol = location.protocol === 'https' ? 'wss' : 'ws'

const siteSocket = createNydus(`${protocol}://${location.hostname}:${location.port}`)
export default siteSocket

import createNydus from 'nydus-client'

const location = window.location
const protocol = location.protocol === 'https:' ? 'wss' : 'ws'

const siteSocket = createNydus(`${protocol}://${location.hostname}:${location.port}`)
export default siteSocket

Fix protocol check for site socket so that it actually works on https.
Fix protocol check for site socket so that it actually works on https.
