Browse Source

fix: socket.io client url

* fixes backend crash with IPv6 and some IPv4 setups
* instead of passing empty url, let socket.io set default url
  (defaults to window.location.host)
ther0bster 9 tháng trước cách đây
mục cha
commit
02b104f56b
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      src/routes/+layout.svelte

+ 1 - 1
src/routes/+layout.svelte

@@ -110,7 +110,7 @@
 			await WEBUI_NAME.set(backendConfig.name);
 
 			if ($config) {
-				const _socket = io(`${WEBUI_BASE_URL}`, {
+				const _socket = io({
 					path: '/ws/socket.io',
 					auth: { token: localStorage.token }
 				});