aboutsummaryrefslogtreecommitdiffstats
path: root/libmproxy/web/app.py
diff options
context:
space:
mode:
authorMaximilian Hils <git@maximilianhils.com>2014-12-10 15:25:40 +0100
committerMaximilian Hils <git@maximilianhils.com>2014-12-10 15:25:40 +0100
commit7e40b8ab09d6d605307342fbfa21129ca15ff055 (patch)
tree3ffbd6263f8550bea9c1cb847b0f4178c1499733 /libmproxy/web/app.py
parentd2feaf5d84820e75e3931522d889748563972c75 (diff)
downloadmitmproxy-7e40b8ab09d6d605307342fbfa21129ca15ff055.tar.gz
mitmproxy-7e40b8ab09d6d605307342fbfa21129ca15ff055.tar.bz2
mitmproxy-7e40b8ab09d6d605307342fbfa21129ca15ff055.zip
web: implement settings store, modularize store
Diffstat (limited to 'libmproxy/web/app.py')
-rw-r--r--libmproxy/web/app.py14
1 files changed, 12 insertions, 2 deletions
diff --git a/libmproxy/web/app.py b/libmproxy/web/app.py
index 31cb3ef1..e832f724 100644
--- a/libmproxy/web/app.py
+++ b/libmproxy/web/app.py
@@ -35,13 +35,22 @@ class WebSocketEventBroadcaster(tornado.websocket.WebSocketHandler):
class Flows(tornado.web.RequestHandler):
def get(self):
self.write(dict(
- list=[f.get_state(short=True) for f in self.application.state.flows]
+ data=[f.get_state(short=True) for f in self.application.state.flows]
))
class Events(tornado.web.RequestHandler):
def get(self):
self.write(dict(
- list=list(self.application.state.events)
+ data=list(self.application.state.events)
+ ))
+
+
+class Settings(tornado.web.RequestHandler):
+ def get(self):
+ self.write(dict(
+ data=dict(
+ showEventLog=True
+ )
))
@@ -62,6 +71,7 @@ class Application(tornado.web.Application):
(r"/updates", ClientConnection),
(r"/events", Events),
(r"/flows", Flows),
+ (r"/settings", Settings),
(r"/flows/clear", FlowClear),
]
settings = dict(