mitmproxy/mitmproxy/addons/anticache.py
Aldo Cortesi f90b4c2ff0 Move options into ctx
Many addons currently save options on configure(), either as individual options
or sometimes by saving the entire options object. The current options should
simply be available on the ctx object, simplifying state management for addons
considerably.
2017-04-26 10:25:56 +12:00

8 lines
145 B
Python

from mitmproxy import ctx
class AntiCache:
def request(self, flow):
if ctx.options.anticache:
flow.request.anticache()