tor-browser

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

worker.py (547B)


      1 def main(request, response):
      2    type = request.GET.first(b"type", None)
      3 
      4    content = b"// nothing to see here"
      5    content += b"\n"
      6    content += b"this.postMessage('hi')"
      7 
      8    response.add_required_headers = False
      9    response.writer.write_status(200)
     10    response.writer.write_header(b"x-content-type-options", b"nosniff")
     11    response.writer.write_header(b"content-length", len(content))
     12    if(type != None):
     13        response.writer.write_header(b"content-type", type)
     14    response.writer.end_headers()
     15 
     16    response.writer.write(content)