← All tests

Service Worker Request Over-Blocking

1. Shields down for the site (#34107, #35461)

With Shields down, requests from a service worker must not be blocked. A tracker on Brave's default lists is requested from the page and from a service worker, via fetch() and importScripts().

Turn Shields off, then Re-run. Fixed: all ALLOWED. Bug: a service-worker row BLOCKED while its page row is ALLOWED. Shields up: all BLOCKED.

RequestInitiatorResult
fetch()page
fetch()service-worker
importScripts()page
importScripts()service-worker

2. Cross-origin re-issue from a fetch handler (#25855)

A service-worker fetch handler intercepts the page's cross-origin request to and re-issues it. Passing the Request object (fetch(event.request)) is the reported failure; passing only the URL (fetch(request.url)) is the reported workaround. Shields state does not matter.

Fixed: both ALLOWED. Bug: fetch(event.request) is BLOCKED while fetch(request.url) is ALLOWED.

Re-issued asResult
fetch(event.request)
fetch(request.url)