File size: 478 Bytes
5a2da96
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# app/core/config.py

from fastapi.middleware.cors import CORSMiddleware
from fastapi import FastAPI

def setup_cors(app: FastAPI):
    """
    Configure CORS settings for development and frontend integration.
    """
    app.add_middleware(
        CORSMiddleware,
        allow_origins=["*"],  # Change this in production to a specific domain like ["https://verbo-ai.vercel.app"]
        allow_credentials=True,
        allow_methods=["*"],
        allow_headers=["*"],
    )