Files
baijiahao_data_crawl/venv/Lib/site-packages/mitmproxy/addons/anticache.py

19 lines
412 B
Python
Raw Normal View History

2025-12-25 11:16:59 +08:00
from mitmproxy import ctx
class AntiCache:
def load(self, loader):
loader.add_option(
"anticache",
bool,
False,
"""
Strip out request headers that might cause the server to return
304-not-modified.
""",
)
def request(self, flow):
if ctx.options.anticache:
flow.request.anticache()