Add base controller, catch controller, and history controller

This commit is contained in:
sha
2024-03-22 00:48:46 +02:00
parent f6b750247c
commit ca6c933fd9
3 changed files with 124 additions and 0 deletions
+15
View File
@@ -0,0 +1,15 @@
class BaseController:
RESTRICTED_NAMESPACES = [
"__history",
"__last_request",
"__last",
"__clear",
"docs",
"redoc",
"api",
]
def check_namespace(self, namespace: str) -> bool:
if namespace in self.RESTRICTED_NAMESPACES:
return False
return True