update references to codey.lol -> codey.horse [new domain]
This commit is contained in:
18
base.py
18
base.py
@@ -77,7 +77,7 @@ async def lifespan(app: FastAPI):
|
||||
|
||||
|
||||
app = FastAPI(
|
||||
title="codey.lol API",
|
||||
title="codey.horse API",
|
||||
version="1.0",
|
||||
contact={"name": "codey"},
|
||||
redirect_slashes=False,
|
||||
@@ -90,13 +90,13 @@ app = FastAPI(
|
||||
util = importlib.import_module("util").Utilities(app, constants)
|
||||
|
||||
origins = [
|
||||
"https://codey.lol",
|
||||
"https://old.codey.lol",
|
||||
"https://api.codey.lol",
|
||||
"https://codey.horse",
|
||||
"https://old.codey.horse",
|
||||
"https://api.codey.horse",
|
||||
"https://status.boatson.boats",
|
||||
"https://_new.codey.lol",
|
||||
"https://_new.codey.horse",
|
||||
"http://localhost:4321",
|
||||
"https://local.codey.lol:4321",
|
||||
"https://local.codey.horse:4321",
|
||||
]
|
||||
|
||||
app.add_middleware(
|
||||
@@ -113,7 +113,7 @@ app.add_middleware(
|
||||
def scalar_docs():
|
||||
# Replace default FastAPI favicon with site favicon
|
||||
html_response = get_scalar_api_reference(
|
||||
openapi_url="/openapi.json", title="codey.lol API"
|
||||
openapi_url="/openapi.json", title="codey.horse API"
|
||||
)
|
||||
try:
|
||||
body = (
|
||||
@@ -123,7 +123,7 @@ def scalar_docs():
|
||||
)
|
||||
body = body.replace(
|
||||
"https://fastapi.tiangolo.com/img/favicon.png",
|
||||
"https://codey.lol/images/favicon.png",
|
||||
"https://codey.horse/images/favicon.png",
|
||||
)
|
||||
# Build fresh response so Content-Length matches modified body
|
||||
return HTMLResponse(content=body, status_code=html_response.status_code)
|
||||
@@ -135,7 +135,7 @@ def scalar_docs():
|
||||
@app.get("/favicon.ico", include_in_schema=False)
|
||||
async def favicon():
|
||||
"""Redirect favicon requests to the site icon."""
|
||||
return RedirectResponse("https://codey.lol/images/favicon.png")
|
||||
return RedirectResponse("https://codey.horse/images/favicon.png")
|
||||
|
||||
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user