Merge pull request #9110 from jitsi/tavram/fix-case-sensitive-replcement

fix(sip-invite) fix baseurl case sensitive replacement
This commit is contained in:
Avram Tudor 2021-05-06 11:24:17 +03:00 committed by GitHub
commit c851136f8e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -830,8 +830,9 @@ export function inviteSipEndpoints( // eslint-disable-line max-params
return Promise.resolve();
}
const regex = new RegExp(`/${roomName}`, 'i');
const baseUrl = Object.assign(new URL(locationURL.toString()), {
pathname: locationURL.pathname.replace(`/${roomName}`, ''),
pathname: locationURL.pathname.replace(regex, ''),
hash: '',
search: ''
});