From c39697d096e07d937ea4f98eb1c43afdecc4f1ac Mon Sep 17 00:00:00 2001 From: Benjamin Bolte Date: Mon, 17 Jun 2024 17:29:28 -0700 Subject: [PATCH] stuff --- store/app/main.py | 3 +-- store/app/routers/users.py | 7 ------- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/store/app/main.py b/store/app/main.py index 2b34af9d..ff50d0d8 100644 --- a/store/app/main.py +++ b/store/app/main.py @@ -12,7 +12,6 @@ from store.app.routers.part import parts_router from store.app.routers.robot import robots_router from store.app.routers.users import users_router -from store.settings import settings @asynccontextmanager @@ -30,7 +29,7 @@ async def lifespan(app: FastAPI) -> AsyncGenerator[None, None]: # Adds CORS middleware. app.add_middleware( CORSMiddleware, - allow_origins=[settings.site.homepage], + allow_origins=["*"], allow_credentials=True, allow_methods=["*"], allow_headers=["*"], diff --git a/store/app/routers/users.py b/store/app/routers/users.py index 1ebd4b35..d2055a35 100644 --- a/store/app/routers/users.py +++ b/store/app/routers/users.py @@ -12,7 +12,6 @@ from store.app.db import Crud from store.app.model import User from store.app.utils.email import send_change_email, send_delete_email, send_reset_password_email, send_verify_email -from store.settings import settings logger = logging.getLogger(__name__) @@ -244,12 +243,6 @@ async def login_user_endpoint( value=token, httponly=True, ) - response.set_cookie( - key="session_token", - value=token, - httponly=True, - domain=settings.site.homepage, - ) await crud.add_session_token(token, user.user_id, 60 * 60 * 24 * 7) return True