feat: harden production data and backups
This commit is contained in:
@@ -16,6 +16,7 @@ class Settings(BaseSettings):
|
||||
official_records_region: str = "RU"
|
||||
official_records_category: str = "records"
|
||||
official_import_required: bool = False
|
||||
seed_demo_data: bool = True
|
||||
import_interval_seconds: int = Field(default=3600, ge=3600)
|
||||
rate_limit_secret: str = "change-rate-limit-secret"
|
||||
log_level: str = "INFO"
|
||||
@@ -39,6 +40,8 @@ class Settings(BaseSettings):
|
||||
raise ValueError("production CORS_ORIGINS must contain only HTTPS origins")
|
||||
if not self.s3_public_endpoint_url.startswith("https://"):
|
||||
raise ValueError("production S3_PUBLIC_ENDPOINT_URL must use HTTPS")
|
||||
if self.seed_demo_data:
|
||||
raise ValueError("SEED_DEMO_DATA must be false in production")
|
||||
return self
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user