mirror of
https://github.com/cpvalente/ontime.git
synced 2026-09-10 00:29:41 +00:00
FIX: remove '/' from host in client-control(#1156)
This commit is contained in:
committed by
GitHub
parent
e500fa6b5e
commit
ce8b0d9850
@@ -38,7 +38,7 @@ export function RedirectClientModal(props: RedirectClientModalProps) {
|
|||||||
onClose();
|
onClose();
|
||||||
};
|
};
|
||||||
|
|
||||||
const host = `${window.location.origin}/`;
|
const host = window.location.origin;
|
||||||
const canSubmit = path !== currentPath && path !== '';
|
const canSubmit = path !== currentPath && path !== '';
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -12,9 +12,7 @@ export const useClientPath = () => {
|
|||||||
|
|
||||||
// notify of client path changes
|
// notify of client path changes
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
//remove leading '/' from path
|
socketSendJson('set-client-path', pathname + search);
|
||||||
const fullPath = (pathname.startsWith('/') ? pathname.slice(1) : pathname) + search;
|
|
||||||
socketSendJson('set-client-path', fullPath);
|
|
||||||
}, [pathname, search]);
|
}, [pathname, search]);
|
||||||
|
|
||||||
// navigate to new path when received from server
|
// navigate to new path when received from server
|
||||||
|
|||||||
@@ -36,7 +36,8 @@ export const connectSocket = () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
socketSendJson('set-client-type', 'ontime');
|
socketSendJson('set-client-type', 'ontime');
|
||||||
socketSendJson('set-client-path', location.pathname);
|
|
||||||
|
socketSendJson('set-client-path', location.pathname + location.search);
|
||||||
};
|
};
|
||||||
|
|
||||||
websocket.onclose = () => {
|
websocket.onclose = () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user