]> git.ipfire.org Git - ipfire.org.git/commitdiff
web: Move API calls for authentication into main vhost
authorMichael Tremer <michael.tremer@ipfire.org>
Mon, 24 Jul 2023 15:00:23 +0000 (15:00 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Mon, 24 Jul 2023 15:00:23 +0000 (15:00 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/web/__init__.py

index c32322c53b300a72052d129b423a6d282993fdfe..57b6006ef5629f039ddd94eefb1797bda04c2930 100644 (file)
@@ -191,6 +191,10 @@ class Application(tornado.web.Application):
                        (r"/legal", StaticHandler, { "template" : "legal.html" }),
                        (r"/help", StaticHandler, { "template" : "help.html" }),
 
+                       # API
+                       (r"/api/check/email", auth.APICheckEmail),
+                       (r"/api/check/uid", auth.APICheckUID),
+
                        # Handle old pages that have moved elsewhere
                        (r"/donation", tornado.web.RedirectHandler, { "url" : "/donate" }),
                        (r"/download", tornado.web.RedirectHandler, { "url" : "/downloads" }),
@@ -339,10 +343,6 @@ class Application(tornado.web.Application):
 
                        # Serve any static files
                        (r"/static/(.*)", tornado.web.StaticFileHandler, { "path" : self.settings.get("static_path") }),
-
-                       # API
-                       (r"/api/check/email", auth.APICheckEmail),
-                       (r"/api/check/uid", auth.APICheckUID),
                ]  + authentication_handlers)
 
                # wiki.ipfire.org