We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f91c21c commit 8f5a5e6Copy full SHA for 8f5a5e6
1 file changed
maestro_worker_python/serve.py
@@ -13,6 +13,7 @@
13
from fastapi.responses import JSONResponse
14
from starlette.concurrency import run_in_threadpool
15
from importlib.machinery import SourceFileLoader
16
+from fastapi.middleware.cors import CORSMiddleware
17
18
from .config import settings
19
from .response import ValidationError, WorkerResponse
@@ -25,6 +26,17 @@
25
26
27
app = FastAPI()
28
29
+origins = ["*"]
30
+
31
+app.add_middleware(
32
+ CORSMiddleware,
33
+ allow_origins=origins,
34
+ allow_credentials=True,
35
+ allow_methods=["*"],
36
+ allow_headers=["*"],
37
+)
38
39
40
logging.basicConfig(level=settings.log_level.upper())
41
42
if settings.enable_json_logging:
0 commit comments