diff --git a/frontend/index.html b/frontend/index.html index 9682e3b7b0..1e1e86823a 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -184,6 +184,7 @@ diff --git a/frontend/src/socket.js b/frontend/src/socket.js index ea687e6949..a942ea6fc5 100644 --- a/frontend/src/socket.js +++ b/frontend/src/socket.js @@ -6,9 +6,10 @@ import { getCachedResource } from "frappe-ui/src/resources/resources" export function initSocket() { let host = window.location.hostname + let siteName = window.site_name let port = window.location.port ? `:${socketio_port}` : "" let protocol = port ? "http" : "https" - let url = `${protocol}://${host}${port}/${host}` + let url = `${protocol}://${host}${port}/${siteName}` let socket = io(url, { withCredentials: true, reconnectionAttempts: 5, diff --git a/hrms/www/hrms.py b/hrms/www/hrms.py index 768400facc..50bb5740d1 100644 --- a/hrms/www/hrms.py +++ b/hrms/www/hrms.py @@ -20,4 +20,6 @@ def get_context_for_dev(): def get_boot(): - return frappe._dict({"push_relay_server_url": frappe.conf.get("push_relay_server_url")}) + return frappe._dict( + {"site_name": frappe.local.site, "push_relay_server_url": frappe.conf.get("push_relay_server_url")} + )