Skip to content

Commit d8ddc33

Browse files
authored
Merge pull request #2 from pearlhacks/deploy-microservices
Update main.py
2 parents 0b2d07b + 4d59b7b commit d8ddc33

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

main.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,18 @@
11
# main.py
22

33
import uvicorn
4+
from fastapi.middleware.cors import CORSMiddleware
45
from fastapi import FastAPI
56
from routes.sheet import sheet_router
67

78
app = FastAPI()
9+
app.add_middleware(
10+
CORSMiddleware,
11+
allow_origins=["*"],
12+
allow_credentials=True,
13+
allow_methods=["*"],
14+
allow_headers=["*"],
15+
)
816

917
app.include_router(sheet_router)
1018

requirements.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,5 @@ google-auth-oauthlib
66
pydantic
77
python-dotenv
88
flask
9-
firebase_admin
9+
firebase_admin
10+
fastapi-cors

0 commit comments

Comments
 (0)