We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1cdeb12 commit f21c8abCopy full SHA for f21c8ab
src/opyrator/api/fastapi_app.py
@@ -1,6 +1,7 @@
1
from typing import Any, Dict
2
3
from fastapi import FastAPI, status
4
+from fastapi.middleware.cors import CORSMiddleware
5
from starlette.responses import RedirectResponse
6
7
from opyrator import Opyrator
@@ -28,6 +29,14 @@ def create_api(opyrator: Opyrator) -> FastAPI:
28
29
30
patch_fastapi(app)
31
32
+ app.add_middleware(
33
+ CORSMiddleware,
34
+ allow_origins=["*"],
35
+ allow_credentials=True,
36
+ allow_methods=["*"],
37
+ allow_headers=["*"],
38
+ )
39
+
40
@app.post(
41
"/call",
42
operation_id="call",
0 commit comments