reformat/naas
This commit is contained in:
5
base.py
5
base.py
@ -54,7 +54,10 @@ def base_head():
|
||||
@app.get("/{path}", include_in_schema=False)
|
||||
def disallow_get_any(request: Request, var: Any = None):
|
||||
path = request.path_params["path"]
|
||||
if not (isinstance(path, str) and path.split("/", maxsplit=1) == "widget"):
|
||||
if not (
|
||||
isinstance(path, str)
|
||||
and (path.split("/", maxsplit=1) == "widget" or path == "misc/no")
|
||||
):
|
||||
return util.get_blocked_response()
|
||||
else:
|
||||
logging.info("OK, %s", path)
|
||||
|
Reference in New Issue
Block a user