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 42d150b commit 512c44dCopy full SHA for 512c44d
api/main.py
@@ -35,7 +35,16 @@
35
from api.nodes.assets_node import AssetsNode
36
37
import logging
38
+from fastapi.middleware.cors import CORSMiddleware
39
app = FastAPI(title="Prompt Bootstrapper API")
40
+# Enable CORS so the static front-end can call API from a different origin
41
+app.add_middleware(
42
+ CORSMiddleware,
43
+ allow_origins=["*"], # adjust to specific origins in production
44
+ allow_credentials=True,
45
+ allow_methods=["*"],
46
+ allow_headers=["*"],
47
+)
48
logger = logging.getLogger("api.main")
49
50
0 commit comments