reformat/naas

This commit is contained in:
2025-05-01 15:54:27 -04:00
parent ad43db289a
commit 3d6f1006a9
3 changed files with 36 additions and 3 deletions

View File

@ -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)