Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(platform): Fix REST API CORS issue + UI build for Firefox #8140

Merged
merged 13 commits into from
Sep 25, 2024
Merged
8 changes: 5 additions & 3 deletions autogpt_platform/backend/backend/server/rest_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,12 @@ def run_service(self):

app.add_middleware(
CORSMiddleware,
allow_origins=["*"], # Allows all origins
allow_origins=[
"http://localhost:3000",
"http://127.0.0.1:3000",
"https://dev-builder.agpt.co",
Swiftyos marked this conversation as resolved.
Show resolved Hide resolved
],
allow_credentials=True,
allow_methods=["*"], # Allows all methods
aarushik93 marked this conversation as resolved.
Show resolved Hide resolved
allow_headers=["*"], # Allows all headers
)

# Define the API routes
Expand Down
3 changes: 3 additions & 0 deletions autogpt_platform/frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
"lint": "next lint",
"format": "prettier --write ."
},
"browserslist": [
"defaults"
],
"dependencies": {
"@hookform/resolvers": "^3.9.0",
"@next/third-parties": "^14.2.5",
Expand Down
1 change: 0 additions & 1 deletion autogpt_platform/market/market/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ async def lifespan(app: fastapi.FastAPI):
allow_origins=[
"http://localhost:3000",
"http://127.0.0.1:3000",
"http://127.0.0.1:3000",
Swiftyos marked this conversation as resolved.
Show resolved Hide resolved
"https://dev-builder.agpt.co",
],
allow_credentials=True,
Expand Down
Loading