From 0fbd26e9bf905e58a4d55896057d2ad28e6cafc7 Mon Sep 17 00:00:00 2001 From: Damian at mba Date: Sat, 8 Oct 2022 11:04:17 +0200 Subject: [PATCH] simpler socketio setup URL handling --- frontend/src/app/socketio/middleware.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/app/socketio/middleware.ts b/frontend/src/app/socketio/middleware.ts index 1c2e11aff4..d4803810a4 100644 --- a/frontend/src/app/socketio/middleware.ts +++ b/frontend/src/app/socketio/middleware.ts @@ -22,9 +22,9 @@ import * as InvokeAI from '../invokeai'; * some new action to handle whatever data was sent from the server. */ export const socketioMiddleware = () => { - const { hostname, port } = new URL(window.location.href); + const { origin } = new URL(window.location.href); - const socketio = io(`http://${hostname}:${port}`, { + const socketio = io(origin, { timeout: 60000, });