Browse Source

fix(sip-invite) fix sip invite jwt not being sent correctly

master
Tudor-Ovidiu Avram 4 years ago
parent
commit
32ecd6310c
1 changed files with 5 additions and 2 deletions
  1. 5
    2
      react/features/invite/functions.js

+ 5
- 2
react/features/invite/functions.js View File

@@ -825,13 +825,15 @@ export function inviteSipEndpoints( // eslint-disable-line max-params
825 825
         return Promise.resolve();
826 826
     }
827 827
 
828
+    const baseUrl = window.location.href.toLowerCase().replace(`/${roomName}`, '');
829
+
828 830
     return fetch(
829
-       `${sipInviteUrl}?token=${jwt}`,
831
+       sipInviteUrl,
830 832
        {
831 833
            body: JSON.stringify({
832 834
                callParams: {
833 835
                    callUrlInfo: {
834
-                       baseUrl: window.location.origin,
836
+                       baseUrl,
835 837
                        callName: roomName
836 838
                    }
837 839
                },
@@ -842,6 +844,7 @@ export function inviteSipEndpoints( // eslint-disable-line max-params
842 844
            }),
843 845
            method: 'POST',
844 846
            headers: {
847
+               'Authorization': `Bearer ${jwt}`,
845 848
                'Content-Type': 'application/json'
846 849
            }
847 850
        }

Loading…
Cancel
Save