MicrosoftEdge / MicrosoftEdge/WebView2Feedback
[Problem/Bug]: CustomScheme name matching might be too lenient
@prija-microsoft is already working on this.
Since May 21, 2026.
- Dominant language
- PowerShell
- Stars
- 526
- Forks
- 67
- PR merge metrics
- No merged PRs in 30d
Description
What happened?
I have a CoreWebView2CustomSchemeRegistration with the SchemeName set to myscheme.
This works fine, and requests to myscheme://file.txt come through correctly.
However, if I expand the scheme, for example myschemeextra://file.txt, this comes through too, even though I haven't registered myschemeextra as a scheme.
Is this to be expected?
Importance
Moderate. My app's user experience is affected, but still usable.
Runtime Channel
Stable release (WebView2 Runtime)
Runtime Version
144.0.3719.82
SDK Version
1.0.2849.39
Framework
Winforms
Operating System
Windows 11
OS Version
26200.7623
Repro steps
Register a scheme like this
var customSchemeRegistration = new CoreWebView2CustomSchemeRegistration("myscheme");
customSchemeRegistration.HasAuthorityComponent = false;
var envOptions = new CoreWebView2EnvironmentOptions("--disable-web-security --disable-site-isolation-trials", customSchemeRegistrations: new List<CoreWebView2CustomSchemeRegistration>() { customSchemeRegistration });
Add a handler
webView.CoreWebView2.WebResourceRequested += CoreWebView2_WebResourceRequested;
private void CoreWebView2_WebResourceRequested(object sender, CoreWebView2WebResourceRequestedEventArgs e)
{
// check e.Request.Uri here
}
Verify that the CoreWebView2_WebResourceRequested method receives requests for myscheme:// and myschemeextra:// URLs, but not somethingelse:// URLs.
Repros in Edge Browser
No, issue does not reproduce in the corresponding Edge version
Regression
Don't know
Last working version (if regression)
No response
AB#60843623
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.