cleanup
This commit is contained in:
12
base.py
12
base.py
@ -7,7 +7,6 @@ import asyncio
|
||||
from typing import Any
|
||||
from fastapi import FastAPI
|
||||
from fastapi.middleware.cors import CORSMiddleware
|
||||
from fastapi_utils.tasks import repeat_every
|
||||
|
||||
|
||||
logger = logging.getLogger()
|
||||
@ -44,6 +43,8 @@ allow_headers=["*"])
|
||||
|
||||
|
||||
|
||||
# pylint: disable=missing-function-docstring
|
||||
|
||||
"""
|
||||
Blacklisted routes
|
||||
"""
|
||||
@ -53,22 +54,19 @@ def disallow_get():
|
||||
return util.get_blocked_response()
|
||||
|
||||
@app.get("/{any:path}")
|
||||
def disallow_get_any(var: Any = None):
|
||||
def disallow_get_any(var: Any = None): # pylint: disable=unused-argument
|
||||
return util.get_blocked_response()
|
||||
|
||||
@app.post("/")
|
||||
def disallow_base_post():
|
||||
return util.get_blocked_response()
|
||||
|
||||
# @app.limiter.limit("1/minute")
|
||||
# @app.post("/lyric_cache_list/")
|
||||
# async def rate_limited():
|
||||
# return {"error": "Rate limited"}
|
||||
|
||||
"""
|
||||
End Blacklisted Routes
|
||||
"""
|
||||
|
||||
# pylint: enable=missing-function-docstring
|
||||
|
||||
|
||||
"""
|
||||
Actionable Routes
|
||||
|
Reference in New Issue
Block a user