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
// Prod and staging set the icon in the electron-builder config, so only update it here for dev
132
-
if(isDev){
132
+
if(ELECTRON_ENVIRONMENT.isDev()){
133
133
app.dock.setIcon(`${__dirname}/icon-dev.png`);
134
134
app.setName('New Expensify');
135
135
}
@@ -147,8 +147,38 @@ const mainWindow = (() => {
147
147
titleBarStyle: 'hidden',
148
148
});
149
149
150
+
/*
151
+
* The default origin of our Electron app is app://- instead of https://new.expensify.com or https://staging.new.expensify.com
152
+
* This causes CORS errors because the referer and origin headers are wrong and the API responds with an Access-Control-Allow-Origin that doesn't match app://-
153
+
*
154
+
* To fix this, we'll:
155
+
*
156
+
* 1. Modify headers on any outgoing requests to match the origin of our corresponding web environment.
157
+
* 2. Modify the Access-Control-Allow-Origin header of the response to match the "real" origin of our Electron app.
0 commit comments