diff --git a/app/src/RoomClient.js b/app/src/RoomClient.js
index df276ae..a48a428 100644
--- a/app/src/RoomClient.js
+++ b/app/src/RoomClient.js
@@ -129,7 +129,8 @@ export default class RoomClient
produce,
forceTcp,
displayName,
- muted
+ muted,
+ basePath
} = {})
{
if (!peerId)
@@ -152,6 +153,9 @@ export default class RoomClient
// Whether we force TCP
this._forceTcp = forceTcp;
+ // URL basepath
+ this._basePath = basePath;
+
// Use displayName
if (displayName)
store.dispatch(settingsActions.setDisplayName(displayName));
@@ -1719,7 +1723,7 @@ export default class RoomClient
this._screenSharing = ScreenShare.create(this._device);
- this._signalingSocket = io(this._signalingUrl);
+ this._signalingSocket = io(this._signalingUrl, { path: this._basePath });
this._spotlights = new Spotlights(this._maxSpotlights, this._signalingSocket);
diff --git a/app/src/index.js b/app/src/index.js
index cdefb40..e89d06d 100644
--- a/app/src/index.js
+++ b/app/src/index.js
@@ -115,6 +115,13 @@ function run()
const forceTcp = parameters.get('forceTcp') === 'true';
const displayName = parameters.get('displayName');
const muted = parameters.get('muted') === 'true';
+
+ const { pathname } = window.location;
+
+ let basePath = pathname.substring(0, pathname.lastIndexOf('/'));
+
+ if (!basePath)
+ basePath = '/';
// Get current device.
const device = deviceInfo();
@@ -134,7 +141,8 @@ function run()
produce,
forceTcp,
displayName,
- muted
+ muted,
+ basePath
});
global.CLIENT = roomClient;
@@ -146,7 +154,7 @@ function run()
} persistor={persistor}>
-
+
}>
diff --git a/server/server.js b/server/server.js
index fcde0b1..9fb775b 100755
--- a/server/server.js
+++ b/server/server.js
@@ -494,7 +494,7 @@ function isPathAlreadyTaken(url)
*/
async function runWebSocketServer()
{
- io = require('socket.io')(mainListener);
+ io = require('socket.io')(mainListener, { path: '/' });
io.use(
sharedSession(session, {