Bug with SetUserAgent #363

Open
opened 2026-01-29 16:37:42 +00:00 by claunia · 0 comments
Owner

Originally created by @DiefBell on GitHub (Jul 23, 2019).

Originally assigned to: @GregorBiswanger on GitHub.

Using the following code, which according to what I can find online, should but doesn't set the UserAgent header accordingly, and instead uses the default UserAgent string.

var mainWindow = await Electron.WindowManager.CreateWindowAsync(options); mainWindow.WebContents.Session.SetUserAgent("ModX"); mainWindow.OnReadyToShow += () => { mainWindow.Show(); };

Originally created by @DiefBell on GitHub (Jul 23, 2019). Originally assigned to: @GregorBiswanger on GitHub. Using the following code, which according to what I can find online, should but doesn't set the UserAgent header accordingly, and instead uses the default UserAgent string. `var mainWindow = await Electron.WindowManager.CreateWindowAsync(options); mainWindow.WebContents.Session.SetUserAgent("ModX"); mainWindow.OnReadyToShow += () => { mainWindow.Show(); };`
claunia added the question label 2026-01-29 16:37:42 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/Electron.NET#363