diff --git a/app/src/helpers/windowEvents.ts b/app/src/helpers/windowEvents.ts index 9528ed9..77ea431 100644 --- a/app/src/helpers/windowEvents.ts +++ b/app/src/helpers/windowEvents.ts @@ -171,10 +171,6 @@ export function setupNativefierWindow( options: WindowOptions, window: BrowserWindow, ): void { - if (options.userAgent) { - window.webContents.userAgent = options.userAgent; - } - if (options.proxyRules) { setProxyRules(window, options.proxyRules); } diff --git a/app/src/main.ts b/app/src/main.ts index 2c46894..7e0bf20 100644 --- a/app/src/main.ts +++ b/app/src/main.ts @@ -59,11 +59,15 @@ if (appArgs.portable) { } if (!appArgs.userAgentHonest) { - app.userAgentFallback = removeUserAgentSpecifics( - app.userAgentFallback, - app.getName(), - app.getVersion(), - ); + if (appArgs.userAgent) { + app.userAgentFallback = appArgs.userAgent; + } else { + app.userAgentFallback = removeUserAgentSpecifics( + app.userAgentFallback, + app.getName(), + app.getVersion(), + ); + } } // Take in a URL on the command line as an override