diff --git a/mitmproxy/tools/web/app.py b/mitmproxy/tools/web/app.py index ae542dc5d..ad8e5d2a1 100644 --- a/mitmproxy/tools/web/app.py +++ b/mitmproxy/tools/web/app.py @@ -443,6 +443,14 @@ class Options(RequestHandler): def get(self): self.write(optmanager.dump_dicts(self.master.options)) + def put(self): + update = self.json + try: + self.master.options.update(**update) + except (KeyError, TypeError) as err: + raise APIError(400, "{}".format(err)) + + class Application(tornado.web.Application): def __init__(self, master, debug):