You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was previously using electron-react-boilerplate and have raised an issue there about this topic.
I migrated my project and everything is working fine apart from when I make a fetch request to Google, the URL request is handled by a third-party npm package intended for node only due to CORS in the browser. My code worked fine regardless though with their project despite calling from the renderer process.
I had tried disabling the web security when creating the BrowserWindow() in main process, but while it avoided the CORS issue, my request was still unsucessful. I only noticed the request headers having two additional fields, referer which pointed to the localhost dev server, and cookies.
Is there advice on how to get my Electron app to behave more like the linked boiler plate project is doing? I wasn't able to see what they're doing differently(they have special configuration for the webpack dev server, but nothing for production webpack config). In both cases their index.html is loaded via file://filepath rather than http://localhost:port, is it likely to be due to this?
The text was updated successfully, but these errors were encountered:
I was previously using electron-react-boilerplate and have raised an issue there about this topic.
I migrated my project and everything is working fine apart from when I make a fetch request to Google, the URL request is handled by a third-party npm package intended for node only due to CORS in the browser. My code worked fine regardless though with their project despite calling from the renderer process.
I had tried disabling the web security when creating the
BrowserWindow()
in main process, but while it avoided the CORS issue, my request was still unsucessful. I only noticed the request headers having two additional fields,referer
which pointed to the localhost dev server, andcookies
.Is there advice on how to get my Electron app to behave more like the linked boiler plate project is doing? I wasn't able to see what they're doing differently(they have special configuration for the webpack dev server, but nothing for production webpack config). In both cases their
index.html
is loaded viafile://filepath
rather thanhttp://localhost:port
, is it likely to be due to this?The text was updated successfully, but these errors were encountered: