Hi, I'm trying to load a service worker that's actually a file on disk (not on a website) and it's not working.
My web page code looks like:
navigator.serviceWorker.register('/my-service-worker.js'
I've overridden CefResourceRequestHandler::GetResourceHandler() and it's not being called for "my-service-worker.js" at all.
That works for everything else, why not this one file?
My overridden CefResourceRequestHandler::OnResourceRedirect() also isn't involved with this file.
I also tried the advice here https://www.magpcss.org/ceforum/viewtop ... 20&p=49477
and my CefRequestContextHandler::GetResourceRequestHandler() isn't being called at all!
I think it's going to the real website instead of using my local file because the DevTools console shows this error:
"Service worker registration failed: DOMException: Failed to register a ServiceWorker for scope ('http://www.foo.com/') with script ('http://www.foo.com/my-service-worker.js'): The script resource is behind a redirect, which is disallowed."
How can I get it to load the file from disk?