so. many. changes. (sorry)

This commit is contained in:
Micha R. Albert 2025-07-17 11:54:48 -04:00
parent d445a13646
commit b24cbec4fb
20 changed files with 1692 additions and 161 deletions

View file

@ -29,7 +29,7 @@ class Settings(BaseSettings):
airtable_base: str
slack_signing_secret: str
slack_client_id: str
slack_client_secret: str
slack_bolt_is_broken_so_this_cant_be_called_client_secret: str
slack_bot_token: str
app_base_url: str
game_id_salt: str
@ -38,7 +38,6 @@ class Settings(BaseSettings):
airtable_users_table: str
airtable_items_table: str
airtable_sessions_table: str
airtable_item_addons_table: str
airtable_item_instances_table: str
# Security settings
@ -46,10 +45,19 @@ class Settings(BaseSettings):
max_request_size: int = 1048576 # 1MB default
rate_limit_requests: int = 20 # requests per minute per IP
allowed_origins: str = "*" # Comma-separated list or "*" for development
trust_proxy_headers: bool = False # Whether to trust X-Forwarded-For headers
# Session security
session_ttl_hours: int = 24 # Session expires after 24 hours
# Logging settings
log_level: str = "INFO" # DEBUG, INFO, WARNING, ERROR, CRITICAL
log_format: str = "standard" # standard, json, verbose
log_file: str = "" # Empty string means no file logging, only console
log_max_size: int = 10485760 # 10MB default for log rotation
log_backup_count: int = 5 # Number of backup log files to keep
verbose_logging: bool = False # Enable verbose debug logging
# Redis/Valkey settings - prioritize explicit env vars, fall back to container detection
redis_host: str = environ.get("REDIS_HOST") or (
"valkey" if environ.get("DOCKER_CONTAINER") else "localhost"