Skip to content

Commit 6cf4cdd

Browse files
committed
Don't override static routing in maint
1 parent 36cde63 commit 6cf4cdd

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

core/server.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,10 @@ def __init__(self, *, database: Database) -> None:
6262

6363
if CONFIG["SERVER"]["maintenance"]:
6464
# inject a catch all before any route...
65-
routes.insert(
66-
0, Route("/{path:path}", self.maint_mode, methods=["GET", "POST", "PUT", "PATCH", "DELETE", "OPTIONS"])
65+
routes.append(Route("/", self.maint_mode, methods=["GET", "POST", "PUT", "PATCH", "DELETE", "OPTIONS"]))
66+
routes.append(
67+
Route("/{path:path}", self.maint_mode, methods=["GET", "POST", "PUT", "PATCH", "DELETE", "OPTIONS"])
6768
)
68-
routes.insert(0, Route("/", self.maint_mode, methods=["GET", "POST", "PUT", "PATCH", "DELETE", "OPTIONS"]))
6969

7070
super().__init__(on_startup=[self.event_ready], views=views, routes=routes, middleware=middleware)
7171

0 commit comments

Comments
 (0)