MCPcopy
hub / github.com/scrapy/scrapy / response

Function response

tests/mockserver/mitm_proxy_addon.py:1–5  ·  view source on GitHub ↗
(flow)

Source from the content-addressed store, hash-verified

1def response(flow) -> None:
2 # add custom headers to be able to check that the request went through the proxy
3 flow.response.headers["X-Via-Mitmproxy"] = "1"
4 if flow.client_conn.tls_established:
5 flow.response.headers["X-Via-Mitmproxy-TLS"] = "1"

Callers 1

_mocked_download_funcFunction · 0.85

Calls

no outgoing calls

Tested by 1

_mocked_download_funcFunction · 0.68