From 6812d304a1a1893480360d5439fa09445ad55a2c Mon Sep 17 00:00:00 2001 From: Aldo Cortesi Date: Sun, 14 Sep 2014 12:22:28 +1200 Subject: Basic web service and options --- libmproxy/web/app.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 libmproxy/web/app.py (limited to 'libmproxy/web/app.py') diff --git a/libmproxy/web/app.py b/libmproxy/web/app.py new file mode 100644 index 00000000..7c26c29d --- /dev/null +++ b/libmproxy/web/app.py @@ -0,0 +1,18 @@ + +import os.path +import tornado.web + + +class Application(tornado.web.Application): + def __init__(self, debug): + handlers = [ + ] + settings = dict( + template_path=os.path.join(os.path.dirname(__file__), "templates"), + static_path=os.path.join(os.path.dirname(__file__), "static"), + xsrf_cookies=True, + cookie_secret="__TODO:_GENERATE_YOUR_OWN_RANDOM_VALUE_HERE__", + debug=debug, + ) + tornado.web.Application.__init__(self, handlers, **settings) + -- cgit v1.2.3