tor-browser

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

dropSecure.py (501B)


      1 from cookies.resources.helpers import makeDropCookie, setNoCacheAndCORSHeaders
      2 
      3 def main(request, response):
      4    """Respond to `/cookie/drop/secure` by dropping the two cookie set by
      5    `setSecureTestCookies()`"""
      6    headers = setNoCacheAndCORSHeaders(request, response)
      7 
      8    # Expire the cookies, and return a JSON-encoded success code.
      9    headers.append(makeDropCookie(b"alone_secure", False))
     10    headers.append(makeDropCookie(b"alone_insecure", False))
     11    return headers, b'{"success": true}'