simpler socketio setup URL handling

This commit is contained in:
Damian at mba 2022-10-08 11:04:17 +02:00 committed by Kent Keirsey
parent 2a78eb96d0
commit 0fbd26e9bf

View File

@ -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,
});