This commit is contained in:
saqib mir
2026-05-26 15:57:09 +05:30
2 changed files with 11 additions and 0 deletions
+9
View File
@@ -1,6 +1,7 @@
"""FastAPI app factory."""
from fastapi import FastAPI
from fastapi.middleware.cors import CORSMiddleware
from app import __version__
from app.routers import documents, edits, health, render
@@ -13,6 +14,14 @@ def create_app() -> FastAPI:
description="Auth, metadata, storage, and job-queue gateway over the C++ PDF engine.",
)
app.add_middleware(
CORSMiddleware,
allow_origins=["*"],
allow_credentials=True,
allow_methods=["*"],
allow_headers=["*"],
)
app.include_router(health.router)
app.include_router(documents.router)
app.include_router(render.router)