This commit is contained in:
bskjon 2025-02-27 18:49:02 +01:00
parent c3859b4bea
commit 078ee42f51

View File

@ -11,13 +11,20 @@ const root = ReactDOM.createRoot(
document.getElementById('root') as HTMLElement
);
const wsUrl = () => {
const protocol = window.location.protocol;
const host = window.location.host;
const wsUrl = "http://localhost:8080/ws" //`${protocol}//${host}/ws`;
if (window.location.href.startsWith("http://localhost:3000")) {
return "http://localhost:8080/ws";
} else {
return `${protocol}//${host}/ws`;
}
}
root.render(
<React.StrictMode>
<Provider store={store}>
<StompSessionProvider url={wsUrl} connectHeaders={{}} logRawCommunication={true}
<StompSessionProvider url={wsUrl()} connectHeaders={{}} logRawCommunication={true}
debug={(str) => {
if (str === "Opening Web Socket...") {
}