tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

fetch-destination-worker.js (446B)


      1 self.addEventListener('fetch', function(event) {
      2    if (event.request.url.includes('dummy')) {
      3        let destination = new URL(event.request.url).searchParams.get("dest");
      4        if (event.request.destination == destination ||
      5            (event.request.destination == "empty" && destination == "")) {
      6            event.respondWith(fetch(event.request));
      7        } else {
      8            event.respondWith(Response.error());
      9        }
     10    }
     11 });