Skip to content

Commit

Permalink
fix: stop hardcoding frontend url
Browse files Browse the repository at this point in the history
  • Loading branch information
seelengxd committed Sep 20, 2024
1 parent 2f22b62 commit 8c89425
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion backend/src/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import logging

from src.common.base import Base
from src.common.constants import FRONTEND_URL
from src.common.database import engine

logging.getLogger("passlib").setLevel(logging.ERROR)
Expand All @@ -20,7 +21,7 @@ async def lifespan(app: FastAPI):
server = FastAPI(lifespan=lifespan)

# TODO: refactor to env variable
origins = ["http://localhost:3000"]
origins = [FRONTEND_URL]

server.add_middleware(
CORSMiddleware,
Expand Down

0 comments on commit 8c89425

Please sign in to comment.