I'm working on a kiosk app that uses webviews to show customer websites. We want to block all urls by default and only allow certain domains to load on the kiosk. For this purpose, we are using chrome.webRequest.onBeforeRequest event. We then compare the requested resource URL against our allowed list and this works but is quite cumbersome. We find that we have to allow all sorts of domains like CDNs and third-party APIs. We spend many hours clicking through a customer's website in order to trigger every possible sub-resource that a website might load.
Is there a way to block only web navigation requests, and not page resources? I attempted to use chrome.webNavigation.onBeforeNavigate event, but this event doesn't show the actual URL it just shows "about:blank". Any help is appreciated. Thank you.