brain / src /services /api /connection_docs.py
Leon4gr45's picture
Deploy complete BrainAPI source 257d17ff652a
a29f872 verified
Raw History Blame Contribute Delete
678 Bytes
"""Public connection instructions shared by browsers and automation."""
from pathlib import Path
from fastapi import APIRouter
from fastapi.responses import FileResponse
connection_docs_router = APIRouter()
CONNECTION_GUIDE = Path(__file__).resolve().parents[3] / "CONNECTION.md"
@connection_docs_router.api_route("/api-docs", methods=["GET", "HEAD"], include_in_schema=False)
async def connection_guide():
return FileResponse(
CONNECTION_GUIDE,
media_type="text/plain; charset=utf-8",
filename="CONNECTION.md",
content_disposition_type="inline",
headers={"X-Content-Type-Options": "nosniff", "Cache-Control": "no-cache"},
)