tor-browser

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

set_cookie.py (367B)


      1 import importlib
      2 session_manager = importlib.import_module('device-bound-session-credentials.session_manager')
      3 
      4 # The client will ask the server to set a cookie, because client code can't
      5 # always do so itself (e.g. HttpOnly attribute).
      6 def main(request, response):
      7    request_body = request.body.decode('utf-8')
      8    return (200, [("Set-Cookie", request_body)], "")