mirror of
https://github.com/shadoll/scatcher.git
synced 2025-12-20 02:26:03 +00:00
Refactor namespace checking logic in base_controller.py
This commit is contained in:
@@ -9,7 +9,17 @@ class BaseController:
|
||||
"api",
|
||||
]
|
||||
|
||||
BLACK_LIST = [
|
||||
".env",
|
||||
"favicon.ico",
|
||||
"robots.txt",
|
||||
"wp-login.php",
|
||||
".DS_Store",
|
||||
]
|
||||
|
||||
def check_namespace(self, namespace: str) -> bool:
|
||||
if namespace in self.RESTRICTED_NAMESPACES:
|
||||
return False
|
||||
if namespace in self.BLACK_LIST:
|
||||
return False
|
||||
return True
|
||||
|
||||
Reference in New Issue
Block a user