Open parsiya opened 4 years ago
Did not work, in main.js
electron.session.defaultSession.webRequest.onBeforeSendHeaders((details, callback) => {
details.requestHeaders['Origin'] = 'electron://graphiql-app';
callback({ cancel: false, requestHeaders: details.requestHeaders });
});
electron.session.defaultSession.setProxy({proxyRules:"http=localhost:8090;https=localhost:8090"}, function() {});
Seems like we might need to look inside app.js
and manually mess with the ClientRequest
going out.
Find a good example and try it. I think GraphiQL was not a good example. We need practical stuff. Might be hard because most consumer Electron apps honor the system proxy settings.
Did not work
--proxy-server
to the GraphiQL executable command line.app.on('ready'
. Then repacking app.asar and running GraphiQL.