fix 404 DDoS

This commit is contained in:
Aura
2022-04-10 17:11:18 +08:00
parent 3d916523ca
commit 64e4cd7a52
2 changed files with 5 additions and 6 deletions

Submodule YYeTsFE updated: 2080174a68...52b9770c96

View File

@@ -764,11 +764,10 @@ class BlacklistHandler(BaseHandler):
class NotFoundHandler(BaseHandler):
def get(self): # for react app
if self.request.uri not in ["/", "/home", "/discuss", "/login", "/404", "/search",
"/resource", "/me", "/database", "help", "/statistics"
]:
self.ban()
# if self.request.uri not in ["/", "/home", "/discuss", "/login", "/404", "/search",
# "/resource", "/me", "/database", "help", "/statistics"
# ]:
# self.ban()
self.render(index)