From be241529c00b7f4b6f11bd298a9ecebf6bf0e063 Mon Sep 17 00:00:00 2001 From: ptdev Date: Wed, 13 Jul 2022 07:18:24 +0100 Subject: [PATCH] Clear cache and add user-agent on WebView2 changelog request (#550) --- AutoUpdater.NET/UpdateForm.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/AutoUpdater.NET/UpdateForm.cs b/AutoUpdater.NET/UpdateForm.cs index e5e8b2be..664e37c3 100644 --- a/AutoUpdater.NET/UpdateForm.cs +++ b/AutoUpdater.NET/UpdateForm.cs @@ -89,6 +89,8 @@ private void WebView_CoreWebView2InitializationCompleted(object sender, CoreWebV webView2.CoreWebView2.Settings.AreDefaultContextMenusEnabled = false; webView2.CoreWebView2.Settings.IsStatusBarEnabled = false; webView2.CoreWebView2.Settings.AreDevToolsEnabled = Debugger.IsAttached; + webView2.CoreWebView2.Settings.UserAgent = AutoUpdater.GetUserAgent(); + webView2.CoreWebView2.Profile.ClearBrowsingDataAsync(); webView2.Show(); webView2.BringToFront(); if (null != AutoUpdater.BasicAuthChangeLog)