tor-browser

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

echo-subresource-client-hints-received.py (476B)


      1 """ Handle the sub-resource requests and attach the received client info to
      2 the response.
      3 """
      4 
      5 
      6 def main(request, response):
      7    response.status = 200
      8 
      9    # Echo the received CH headers.
     10    response.headers.set(
     11        b"server_received_bitness",
     12        "true" if b"sec-ch-ua-bitness" in request.headers else "false")
     13    response.headers.set(
     14        b"server_received_full_version_list", "true"
     15        if b"sec-ch-ua-full-version-list" in request.headers else "false")