Skip to content

Commit

Permalink
Merge pull request #90 from ssciwr/cookie_secure
Browse files Browse the repository at this point in the history
Add COOKIE_SECURE setting
  • Loading branch information
lkeegan authored Sep 25, 2024
2 parents cd74550 + e53fd3f commit bbea732
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions mondey_backend/src/mondey_backend/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ class AppSettings(BaseSettings):
PORT: int = 8000
RELOAD: bool = True
LOG_LEVEL: str = "info"
COOKIE_SECURE: bool = False


app_settings = AppSettings()
4 changes: 3 additions & 1 deletion mondey_backend/src/mondey_backend/users.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@ async def get_user_manager(
yield UserManager(user_db)


cookie_transport = CookieTransport(cookie_max_age=3600)
cookie_transport = CookieTransport(
cookie_max_age=3600, cookie_secure=app_settings.COOKIE_SECURE
)


def get_database_strategy(
Expand Down

0 comments on commit bbea732

Please sign in to comment.