client: take care of trailing slash in wsUrl
This commit is contained in:
@@ -44,7 +44,7 @@ export default class MhdMapClient {
|
||||
this.startMap();
|
||||
|
||||
const loc = document.location;
|
||||
this.wsUrl = 'ws' + (loc.protocol === 'https:' ? 's' : '')+ '://' + loc.host + loc.pathname + '/ws';
|
||||
this.wsUrl = 'ws' + (loc.protocol === 'https:' ? 's' : '')+ '://' + loc.host + loc.pathname.replace(/\/$/, "") + '/ws';
|
||||
|
||||
await this.connectWs();
|
||||
setInterval(() => {
|
||||
|
||||
Reference in New Issue
Block a user