扫码登录,获取cookies
This commit is contained in:
Binary file not shown.
@@ -4,16 +4,18 @@ Loads settings from environment variables using pydantic-settings.
|
||||
"""
|
||||
|
||||
from pydantic_settings import BaseSettings
|
||||
from typing import Optional
|
||||
|
||||
|
||||
class SharedSettings(BaseSettings):
|
||||
"""Shared settings across all backend services."""
|
||||
|
||||
# Database
|
||||
DATABASE_URL: str = "mysql+aiomysql://root:password@localhost/weibo_hotsign"
|
||||
|
||||
# Redis
|
||||
REDIS_URL: str = "redis://localhost:6379/0"
|
||||
# Database (默认使用 SQLite,生产环境可配置为 MySQL)
|
||||
DATABASE_URL: str = "sqlite+aiosqlite:///../weibo_hotsign.db"
|
||||
#mysql+aiomysql://root:password@localhost/weibo_hotsign
|
||||
# Redis (可选,本地开发可以不使用)
|
||||
REDIS_URL: Optional[str] = None
|
||||
USE_REDIS: bool = False # 是否启用 Redis
|
||||
|
||||
# JWT
|
||||
JWT_SECRET_KEY: str = "change-me-in-production"
|
||||
@@ -22,6 +24,9 @@ class SharedSettings(BaseSettings):
|
||||
|
||||
# Cookie encryption
|
||||
COOKIE_ENCRYPTION_KEY: str = "change-me-in-production"
|
||||
|
||||
# Environment
|
||||
ENVIRONMENT: str = "development"
|
||||
|
||||
class Config:
|
||||
case_sensitive = True
|
||||
|
||||
Reference in New Issue
Block a user