Adjusted WS url
This commit is contained in:
parent
3f403e3009
commit
e380f12cd2
@ -10,10 +10,14 @@ import { StompSessionProvider } from 'react-stomp-hooks';
|
|||||||
const root = ReactDOM.createRoot(
|
const root = ReactDOM.createRoot(
|
||||||
document.getElementById('root') as HTMLElement
|
document.getElementById('root') as HTMLElement
|
||||||
);
|
);
|
||||||
|
|
||||||
|
const protocol = window.location.protocol;
|
||||||
|
const host = window.location.host;
|
||||||
|
const wsUrl = `${protocol}://${host}/ws`;
|
||||||
root.render(
|
root.render(
|
||||||
<React.StrictMode>
|
<React.StrictMode>
|
||||||
<Provider store={store}>
|
<Provider store={store}>
|
||||||
<StompSessionProvider url={"http://localhost:8080/ws"} connectHeaders={{}} logRawCommunication={true}
|
<StompSessionProvider url={wsUrl} connectHeaders={{}} logRawCommunication={true}
|
||||||
debug={(str) => {
|
debug={(str) => {
|
||||||
if (str === "Opening Web Socket...") {
|
if (str === "Opening Web Socket...") {
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user