mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-26 10:16:27 +00:00
f90b4c2ff0
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.
8 lines
145 B
Python
8 lines
145 B
Python
from mitmproxy import ctx
|
|
|
|
|
|
class AntiCache:
|
|
def request(self, flow):
|
|
if ctx.options.anticache:
|
|
flow.request.anticache()
|