Skip to content

Commit

Permalink
fix webview2 https redirect (fixes #438)
Browse files Browse the repository at this point in the history
  • Loading branch information
myangelkamikaze committed Feb 14, 2024
1 parent a00a478 commit a15c058
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Browser/WebView2Browser/WebView2ViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,14 @@ private void CoreWebView2_ProcessFailed(object? sender, CoreWebView2ProcessFaile
private void CoreWebView2_NavigationStarted(object? sender, CoreWebView2NavigationStartingEventArgs e)
{
if (WebView2?.CoreWebView2 == null) return;

// would probably be better if we could disable the https redirect but this should work for now
if (e.IsRedirected && e.Uri.Contains("https://www.dmm.com/netgame/social/-/gadgets/=/app_id=854854/"))
{
Navigate("http://www.dmm.com/netgame/social/-/gadgets/=/app_id=854854/");
return;
}

if (IsNavigating) return;

if (e.Uri.Contains(@"/rt.gsspat.jp/"))
Expand Down

0 comments on commit a15c058

Please sign in to comment.