You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
When using a self-signed certificate and bypassing security warning using this suggested method:
await webView.CoreWebView2.CallDevToolsProtocolMethodAsync("Security.setIgnoreCertificateErrors", "{"ignore": true}");
browser cache appears to not be used when serving content, and the server is always hit for content being cached. If requests are switched to HTTP, caching appears to work fine.
If there any other suggested methods to get caching to work in WebView2 with a self signed certificate, please let me know.
Version
SDK: 1.0.1245.22
Runtime: 103.0.1264.44
Framework: WPF
OS: Win11
Repro Steps
Download an resource from a server secured with a self-signed certificate with the SSL warning suppressed. Try to download the resource again, and you can see the server is hit again to request the resource.
Here are two sample request and response headers from subsequent calls (that should pull from the local cache) using HTTP and using HTTPS with a self-signed certificate. You can see the HTTP method has "206 Partial Content (from disk cache)", which does not hit the server again.
Chromium treats a self-signed certificate as a certificate error (even after setting IgnoreCertificateErrors), and thus the site is not to be trusted fully.
Per my understanding, there isn't a way to get caching to work in WebView2 with a self signed/invalid certificate.
Description
When using a self-signed certificate and bypassing security warning using this suggested method:
await webView.CoreWebView2.CallDevToolsProtocolMethodAsync("Security.setIgnoreCertificateErrors", "{"ignore": true}");
browser cache appears to not be used when serving content, and the server is always hit for content being cached. If requests are switched to HTTP, caching appears to work fine.
If there any other suggested methods to get caching to work in WebView2 with a self signed certificate, please let me know.
Version
SDK: 1.0.1245.22
Runtime: 103.0.1264.44
Framework: WPF
OS: Win11
Repro Steps
Download an resource from a server secured with a self-signed certificate with the SSL warning suppressed. Try to download the resource again, and you can see the server is hit again to request the resource.
Here are two sample request and response headers from subsequent calls (that should pull from the local cache) using HTTP and using HTTPS with a self-signed certificate. You can see the HTTP method has "206 Partial Content (from disk cache)", which does not hit the server again.
// HTTP request
// Request Headers
Request URL: http://localhost/Commander/api/File/View/Demos%2FColts%20Vs%20Bills%202021?v=20220608091714
Request Method: GET
Status Code: 206 Partial Content (from disk cache)
Remote Address: [::1]:80
Referrer Policy: strict-origin-when-cross-origin
// Response Headers
Accept-Ranges: bytes
Cache-Control: private,max-age=2592000
Content-Length: 167273308
Content-Range: bytes 26738688-194011995/194011996
Content-Type: video/mp4
Date: Fri, 29 Jul 2022 16:01:12 GMT
ETag: "20220608051715"
Last-Modified: Wed, 08 Jun 2022 21:17:15 GMT
Server: Microsoft-HTTPAPI/2.0
// HTTPS Request with self signed certificate
// Request Headers
:authority: localhost
:method: GET
:path: /Commander/api/File/View/Demos%2FColts%20Vs%20Bills%202021?v=20220608091714
:scheme: https
accept: /
accept-encoding: identity;q=1, *;q=0
accept-language: en-US,en;q=0.9
range: bytes=29949952-
referer: https://localhost/app/slides/ce7421bb-71f1-4cfe-aabd-1996b79438af
sec-ch-ua: ".Not/A)Brand";v="99", "Microsoft Edge";v="103", "Chromium";v="103", "Microsoft Edge WebView2";v="103"
sec-ch-ua-mobile: ?0
sec-ch-ua-platform: "Windows"
sec-fetch-dest: video
sec-fetch-mode: no-cors
sec-fetch-site: same-origin
user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.5060.66 Safari/537.36 Edg/103.0.1264.44
// Response Headers
accept-ranges: bytes
cache-control: private,max-age=2592000
Content-Length: 164062044
Content-Range: bytes 29949952-194011995/194011996
content-type: video/mp4
date: Fri, 29 Jul 2022 16:29:33 GMT
etag: "20220608051715"
last-modified: Wed, 08 Jun 2022 21:17:15 GMT
server: Microsoft-HTTPAPI/2.0
The text was updated successfully, but these errors were encountered: