Fixes for runpod test

This commit is contained in:
2024-11-16 21:51:18 +01:00
parent 9dfd5ddc39
commit c44d0ffbdf
8 changed files with 58 additions and 19 deletions

View File

@@ -30,8 +30,7 @@ const App = () => {
response_timeout: 10.0
});
const { wsState, sendMessage, addMessageHandler } = useWebSocket('ws://localhost:8080/ws');
const { wsState, sendMessage, addMessageHandler } = useWebSocket(`${window.location.protocol === 'https:' ? 'wss:' : 'ws:'}//${window.location.host}/ws`);
useEffect(() => {
addMessageHandler((message) => {
switch(message.type) {