Improved support for authentication cookies

This commit is contained in:
Lino Mallevaey
2025-08-19 18:20:37 +02:00
parent cdbd58905d
commit 954f73a0f5
3 changed files with 14 additions and 1 deletions

View File

@@ -70,6 +70,10 @@ class Settings(BaseSettings):
def database_url(self) -> str:
return f"mysql+<driver>://{self.DATABASE_USER}:{self.DATABASE_PASSWORD}@{self.DATABASE_HOST}:{self.DATABASE_PORT}/{self.DATABASE_NAME}"
@property
def app_url(self) -> str:
return f"{'https' if settings.USE_SSL else 'http'}://{settings.APP_DOMAIN}{':' + str(settings.PORT) if (settings.PORT != 80 and settings.ENV == 'dev') else ''}"
@property
def access_token_expire(self) -> timedelta:
return timedelta(minutes=self.ACCESS_TOKEN_EXPIRE_MINUTES)