diff --git a/index.js b/index.js index 6fcd2aa1..c1437847 100644 --- a/index.js +++ b/index.js @@ -183,6 +183,7 @@ app.once("browser-window-created", (event, win) => { app.userAgentFallback = updatedUserAgent; win.webContents.session.webRequest.onBeforeSendHeaders((details, cb) => { + // this will only happen if login failed, and "retry" was pressed if (win.webContents.getURL().startsWith("https://accounts.google.com") && details.url.startsWith("https://accounts.google.com")){ details.requestHeaders["User-Agent"] = originalUserAgent; }