We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 52cce19 commit 091aa47Copy full SHA for 091aa47
.changeset/stale-forks-lay.md
@@ -0,0 +1,5 @@
1
+---
2
+'@e2b/code-interpreter-template': patch
3
4
+
5
+allow cors
template/server/main.py
@@ -6,6 +6,7 @@
6
7
from contextlib import asynccontextmanager
8
from fastapi import FastAPI, Request
9
+from fastapi.middleware.cors import CORSMiddleware
10
from fastapi.responses import PlainTextResponse
11
12
from api.models.context import Context
@@ -60,6 +61,14 @@ async def lifespan(app: FastAPI):
60
61
62
app = FastAPI(lifespan=lifespan)
63
64
+app.add_middleware(
65
+ CORSMiddleware,
66
+ allow_origins=["*"],
67
+ allow_credentials=True,
68
+ allow_methods=["*"],
69
+ allow_headers=["*"],
70
+)
71
72
logger.info("Starting Code Interpreter server")
73
74
0 commit comments