Skip to content

Commit

Permalink
stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
codekansas committed Jun 18, 2024
1 parent 5652982 commit c39697d
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
3 changes: 1 addition & 2 deletions store/app/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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=["*"],
Expand Down
7 changes: 0 additions & 7 deletions store/app/routers/users.py
Original file line number Diff line number Diff line change
Expand Up @@ -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__)

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit c39697d

Please sign in to comment.