This commit is contained in:
2025-01-11 20:59:10 -05:00
parent 85a0d6bc62
commit 3c57f13557
18 changed files with 464 additions and 365 deletions

12
base.py
View File

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