see modifying headers:
https://learn.microsoft.com/en-us/microsoft-edge/webview2/how-to/webresourcerequested?tabs=dotnet
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I'm trying to write to program with webview2, the control document is here:
https://learn.microsoft.com/en-us/microsoft-edge/webview2/
The WebView2.CoreWebView2.CookieManager provides lots of methods to read/write cookies, but this is not what I want.
I want to know when the webview2 web page reads/writes the cookies on my disk, or disable cookie read/write for specified site.
For example, I'm the user that use a program with webview2 to navigate www sites, and I know www.microsoft.com is friendly to me, so I allow this site to write/read cookies in my disk, so I add it into the whitelist. And I also know www.buygoodsfoo.com will peek what I had buy from internet through cookies, and may push ADs to me, so I won't let it read/write cookies on my disk, then I can add it in the blacklist.
So there is a requirements, that I need to prevents specified site to read/write cookes in webview2 program, or when the site attempt to read/write cookies, the object control could raise up an event, so I can write some code to do such work in the event callback, cancel it or pass it.
who can tell me the way?
Thanks very much.