]> git.ipfire.org Git - pbs.git/commitdiff
Remove complicated handling of static files
authorMichael Tremer <michael.tremer@ipfire.org>
Sat, 7 Oct 2017 11:41:57 +0000 (12:41 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Sat, 7 Oct 2017 11:41:57 +0000 (12:41 +0100)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/web/__init__.py

index 1ff961038a56b83ae28d52267ee3bbb84fe810d4..194d5ced38c4441cddf23b200007b400b6d35529 100644 (file)
@@ -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")