Adjusted WS url

This commit is contained in:
bskjon 2025-02-23 04:11:08 +01:00
parent 3f403e3009
commit e380f12cd2

View File

@ -10,10 +10,14 @@ import { StompSessionProvider } from 'react-stomp-hooks';
const root = ReactDOM.createRoot(
document.getElementById('root') as HTMLElement
);
const protocol = window.location.protocol;
const host = window.location.host;
const wsUrl = `${protocol}://${host}/ws`;
root.render(
<React.StrictMode>
<Provider store={store}>
<StompSessionProvider url={"http://localhost:8080/ws"} connectHeaders={{}} logRawCommunication={true}
<StompSessionProvider url={wsUrl} connectHeaders={{}} logRawCommunication={true}
debug={(str) => {
if (str === "Opening Web Socket...") {
}