tor-browser

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

credentialless_resource.sjs (664B)


      1 /* Any copyright is dedicated to the Public Domain.
      2    http://creativecommons.org/publicdomain/zero/1.0/ */
      3 
      4 "use strict";
      5 // small red image
      6 const IMG_BYTES = atob(
      7   "iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12" +
      8     "P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg=="
      9 );
     10 
     11 function handleRequest(request, response) {
     12   response.seizePower();
     13   response.write("HTTP/1.1 200 OK\r\n");
     14   response.write("Content-Type: image/png\r\n");
     15   if (request.queryString === "corp_cross_origin") {
     16     response.write("Cross-Origin-Resource-Policy: cross-origin\r\n");
     17   }
     18   response.write("\r\n");
     19   response.write(IMG_BYTES);
     20   response.finish();
     21 }