tor-browser

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

dropSameSiteMultiAttribute.py (969B)


      1 from cookies.resources.helpers import makeDropCookie, setNoCacheAndCORSHeaders
      2 
      3 def main(request, response):
      4    """Respond to `/cookies/resources/dropSameSiteMultiAttribute.py by dropping
      5    the cookies set by setSameSiteMultiAttribute.py"""
      6    headers = setNoCacheAndCORSHeaders(request, response)
      7 
      8    # Expire the cookies, and return a JSON-encoded success code.
      9    headers.append(makeDropCookie(b"samesite_unsupported", True))
     10    headers.append(makeDropCookie(b"samesite_unsupported_none", True))
     11    headers.append(makeDropCookie(b"samesite_unsupported_lax", False))
     12    headers.append(makeDropCookie(b"samesite_unsupported_strict", False))
     13    headers.append(makeDropCookie(b"samesite_none_unsupported", True))
     14    headers.append(makeDropCookie(b"samesite_lax_unsupported", True))
     15    headers.append(makeDropCookie(b"samesite_strict_unsupported", True))
     16    headers.append(makeDropCookie(b"samesite_lax_none", True))
     17    return headers, b'{"success": true}'