diff options
Diffstat (limited to 'mitmproxy/addons/anticache.py')
-rw-r--r-- | mitmproxy/addons/anticache.py | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/mitmproxy/addons/anticache.py b/mitmproxy/addons/anticache.py index 8d748a21..5b34d5a5 100644 --- a/mitmproxy/addons/anticache.py +++ b/mitmproxy/addons/anticache.py @@ -1,10 +1,7 @@ -class AntiCache: - def __init__(self): - self.enabled = False +from mitmproxy import ctx - def configure(self, options, updated): - self.enabled = options.anticache +class AntiCache: def request(self, flow): - if self.enabled: + if ctx.options.anticache: flow.request.anticache() |