mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-11 02:31:45 +00:00
add comment to useragent fix
This commit is contained in:
1
index.js
1
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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user