diff --git a/store/app/api/routers/main.py b/store/app/api/routers/main.py index e217ec94..a718beac 100644 --- a/store/app/api/routers/main.py +++ b/store/app/api/routers/main.py @@ -8,7 +8,9 @@ from fastapi import APIRouter, FastAPI, HTTPException, status from fastapi.middleware.cors import CORSMiddleware from pydantic import BaseModel + from store.app.api.routers.users import users_router +from store.settings import settings logger = logging.getLogger(__name__) @@ -18,8 +20,8 @@ app.add_middleware( CORSMiddleware, - allow_origins=["*"], # Allow all origins - # allow_credentials=True, + allow_origins=[settings.site.homepage], # Allow all origins + allow_credentials=True, allow_methods=["*"], # Allow all methods allow_headers=["*"], # Allow all headers )