I have an extension which sets a https web proxy via pac_script and registeres an onAuthRequired listener to authenticate the proxy.
For some reason requests from one specific website (https://client.wvd.microsoft.com/arm/webclient/index.html) are not authenticated through the onAuthRequired listener, the browser shows the auth popup instead and the onAuthRequired is never triggered.
I’ve uploaded extension example and golang proxy example as well, but any https proxy will work – https://gist.github.com/nikitakot/30c053a4692da7751207bd35aadb1159.
Only https://client.wvd.microsoft.com/arm/webclient/index.html has this problem, for ex. if I change PAC script in the extension and navigate to google.com the proxy is correctly authenticated through the onAuthRequired.
function FindProxyForURL(url, host) {
if (url.startsWith("https://") || url.startsWith("wss://")) {
if (url.includes("google.com")) return "HTTPS dummyproxy.mydomain.app:8082";
}
return "DIRECT";
}
I tried to trigger onAuthRequired manually by doing dummy fetch
requests through proxy and it helps for a limited period of time, then folloup navigations on the problematic website trigger the auth popup again.
Technically I can manually do these manual dummy fetches in a loop to keep the proxy authenticated, but I would like to really avoid that and find a reason why this website skips the onAuthRequired listener.