use window location for ws in prod
This commit is contained in:
parent
c123669828
commit
c8282b215d
1 changed files with 1 additions and 1 deletions
|
|
@ -172,7 +172,7 @@ export const state = writable<State>({
|
||||||
export const connect = () => {
|
export const connect = () => {
|
||||||
const token = Cookies.get('token')
|
const token = Cookies.get('token')
|
||||||
if (token) {
|
if (token) {
|
||||||
let url = "ws://localhost:3000/realtime"
|
let url = `ws://${window.location.hostname}/realtime`
|
||||||
if (dev) {
|
if (dev) {
|
||||||
url = "ws://localhost:3001/realtime"
|
url = "ws://localhost:3001/realtime"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue