allow to set "/"

pull/2955/head
Max Alekseenko 5 years ago
parent 253e43914d
commit 5523508da2
  1. 7
      apps/block_scout_web/assets/js/socket.js

@ -1,7 +1,12 @@
import { Socket } from 'phoenix'
import { locale } from './locale'
const socket = new Socket((process.env.SOCKET_ROOT || '') + '/socket', { params: { locale: locale } })
let websocketRootUrl = process.env.SOCKET_ROOT;
if (!websocketRootUrl || websocketRootUrl == '/') {
websocketRootUrl = ''
}
const socket = new Socket(websocketRootUrl + '/socket', { params: { locale: locale } })
socket.connect()
export default socket

Loading…
Cancel
Save