Skip to content

Commit

Permalink
fix: ERR_INVALID_URL error at start meeting (#38)
Browse files Browse the repository at this point in the history
  • Loading branch information
embbnux authored Sep 22, 2022
1 parent dd3c878 commit ffaef18
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,10 @@ function createMainWindow() {
urls: ['https://v.ringcentral.com/*'],
};
mainWindow.webContents.session.webRequest.onHeadersReceived(CORSfilter, (details, callback) => {
if (!details.referrer) {
callback({ responseHeaders: details.responseHeaders })
return;
}
const url = new URL(details.referrer);
if (url.origin === 'https://app.ringcentral.com') {
if (details.responseHeaders['access-control-allow-origin']) {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "ringcentral-community-app",
"description": "A RingCentral community app",
"version": "0.0.5",
"version": "0.0.8",
"main": "main.js",
"homepage": "https://github.com/ringcentral/ringcentral-community-app",
"license": "MIT",
Expand Down

0 comments on commit ffaef18

Please sign in to comment.