tor-browser

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

csp_iframe.sjs (529B)


      1 /* Any copyright is dedicated to the Public Domain.
      2  * http://creativecommons.org/publicdomain/zero/1.0/ */
      3 
      4 function handleRequest(request, response) {
      5   // let's enjoy the amazing CSP setting
      6   response.setHeader(
      7     "Content-Security-Policy",
      8     "frame-ancestors 'self'",
      9     false
     10   );
     11 
     12   // let's avoid caching issues
     13   response.setHeader("Pragma", "no-cache");
     14   response.setHeader("Cache-Control", "no-cache", false);
     15 
     16   // everything is fine - no needs to worry :)
     17   response.setStatusLine(request.httpVersion, 200);
     18 }