Tadeas Kosek
apply generated DDD abstraction
92fd1a7
raw
history blame contribute delete
447 Bytes
"""CORS configuration middleware."""
from fastapi.middleware.cors import CORSMiddleware
def configure_cors(app):
"""Configure CORS for the application."""
app.add_middleware(
CORSMiddleware,
allow_origins=["*"], # Configure appropriately for production
allow_credentials=True,
allow_methods=["*"],
allow_headers=["*"],
expose_headers=["X-Processing-Time", "X-File-Size", "X-Job-Id"]
)