Skip to content

Commit

Permalink
Update main.py
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkHmnv authored Jun 27, 2024
1 parent 1c94d36 commit e6d257b
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions api/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,9 @@ def include_routers(app: FastAPI, routers: tuple[APIRouter]):
)
include_routers(app, routers)

origins = [
"http://localhost",
"http://localhost:3000",
]

app.add_middleware(
CORSMiddleware,
allow_origins=origins,
allow_origins=["*"],
allow_credentials=True,
allow_methods=["*"],
allow_headers=["*"],
Expand All @@ -40,4 +35,4 @@ def include_routers(app: FastAPI, routers: tuple[APIRouter]):
from api.core.database import create_tables

asyncio.run(create_tables())
uvicorn.run('main:app', host='0.0.0.0', port=8000, reload=True)
uvicorn.run('main:app', host='0.0.0.0', port=8000, reload=True)

0 comments on commit e6d257b

Please sign in to comment.