mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-23 08:11:00 +00:00
24 lines
759 B
Python
24 lines
759 B
Python
from tornado import web, template
|
|
import handlers, utils
|
|
|
|
class PathodApp(web.Application):
|
|
def __init__(self, *args, **kwargs):
|
|
self.templates = template.Loader(utils.data.path("templates"))
|
|
web.Application.__init__(self, *args, **kwargs)
|
|
|
|
|
|
def application(**settings):
|
|
return PathodApp(
|
|
[
|
|
(r"/", handlers.Index),
|
|
(r"/log", handlers.Log),
|
|
(r"/help", handlers.Help),
|
|
(r"/preview", handlers.Preview),
|
|
(r"/p/.*", handlers.Pathod, settings),
|
|
],
|
|
debug=True,
|
|
static_path = utils.data.path("static"),
|
|
template_path = utils.data.path("templates"),
|
|
)
|
|
|