🐛 fix(bestdebrid): set user agent on session and webContents level
Cloudflare Turnstile blocks Electron's default user agent. Set a Chrome user agent on both the session and webContents level so the login captcha passes correctly. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
40c539189a
commit
90c73c4091
@ -173,6 +173,10 @@ export class BestDebridWebFallback {
|
||||
existing.close();
|
||||
}
|
||||
|
||||
// Set user agent on session level so Cloudflare Turnstile sees a real Chrome
|
||||
const currentSession = session.fromPartition(partition);
|
||||
currentSession.setUserAgent(BESTDEBRID_USER_AGENT);
|
||||
|
||||
const window = new BrowserWindow({
|
||||
width: 1120,
|
||||
height: 900,
|
||||
@ -186,6 +190,7 @@ export class BestDebridWebFallback {
|
||||
nodeIntegration: false
|
||||
}
|
||||
});
|
||||
window.webContents.setUserAgent(BESTDEBRID_USER_AGENT);
|
||||
window.setMenuBarVisibility(false);
|
||||
window.on("closed", () => {
|
||||
if (this.loginWindow === window) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user