beep boop
This commit is contained in:
8
base.py
8
base.py
@ -47,15 +47,15 @@ allow_headers=["*"])
|
||||
Blacklisted routes
|
||||
"""
|
||||
|
||||
@app.get("/")
|
||||
@app.get("/", include_in_schema=False)
|
||||
def disallow_get():
|
||||
return util.get_blocked_response()
|
||||
|
||||
@app.head("/")
|
||||
@app.head("/", include_in_schema=False)
|
||||
def base_head():
|
||||
return
|
||||
|
||||
@app.get("/{path}")
|
||||
@app.get("/{path}", include_in_schema=False)
|
||||
def disallow_get_any(request: Request, var: Any = None): # pylint: disable=unused-argument
|
||||
path = request.path_params['path']
|
||||
if not (
|
||||
@ -68,7 +68,7 @@ def disallow_get_any(request: Request, var: Any = None): # pylint: disable=unuse
|
||||
logging.info("OK, %s",
|
||||
path)
|
||||
|
||||
@app.post("/")
|
||||
@app.post("/", include_in_schema=False)
|
||||
def disallow_base_post():
|
||||
return util.get_blocked_response()
|
||||
|
||||
|
Reference in New Issue
Block a user