From: Michael Tremer Date: Sat, 7 Oct 2017 11:41:57 +0000 (+0100) Subject: Remove complicated handling of static files X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0f86fb072d5442a8cfafc9eaf59b3cd007419299;p=pbs.git Remove complicated handling of static files Signed-off-by: Michael Tremer --- diff --git a/src/web/__init__.py b/src/web/__init__.py index 1ff96103..194d5ced 100644 --- a/src/web/__init__.py +++ b/src/web/__init__.py @@ -101,13 +101,6 @@ class Application(tornado.web.Application): tornado.web.Application.__init__(self, **settings) - self.settings["static_path"] = static_path = STATICDIR - static_handlers = [ - (r"/static/(.*)", tornado.web.StaticFileHandler, dict(path = static_path)), - (r"/(favicon\.ico)", tornado.web.StaticFileHandler, dict(path = static_path)), - (r"/(robots\.txt)", tornado.web.StaticFileHandler, dict(path = static_path)), - ] - self.add_handlers(r".*", [ # Entry site that lead the user to index (r"/", IndexHandler), @@ -247,11 +240,6 @@ class Application(tornado.web.Application): # API handlers (r"/api/packages/autocomplete", handlers_api.ApiPackagesAutocomplete), - - ] + static_handlers + [ - - # Everything else is catched by the 404 handler. - (r"/.*", Error404Handler), ]) logging.info("Successfully initialied application")