add comment to useragent fix

This commit is contained in:
Araxeus
2021-12-16 19:29:09 +02:00
parent baeebd1959
commit 8f2ed3039a

View File

@ -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;
}