e08e031ad0
- nginx: add HSTS (max-age=31536000) and gzip for text/css/js/json - entries: add limit/offset query params (default 200, max 1000) - Ntfy: wire NTFY_URL/NTFY_TOKEN through env; notify on startup, new registration, admin login, user disable, and user delete - httpx==0.28.1 added for async Ntfy HTTP calls Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
21 lines
452 B
Python
21 lines
452 B
Python
from typing import Optional
|
|
from pydantic_settings import BaseSettings
|
|
|
|
|
|
class Settings(BaseSettings):
|
|
database_url: str
|
|
secret_key: str
|
|
access_token_expire_minutes: int = 480
|
|
algorithm: str = "HS256"
|
|
admin_username: str
|
|
admin_password: str
|
|
allowed_origins: str = "http://localhost"
|
|
ntfy_url: Optional[str] = None
|
|
ntfy_token: Optional[str] = None
|
|
|
|
class Config:
|
|
env_file = ".env"
|
|
|
|
|
|
settings = Settings()
|