[server]
name = "actix-admin-server"
version = "0.1.0"
port = 3400
host = "0.0.0.0"
log_level = "info"
[database.mongodb]
host = "localhost"
port = 27017
database = "admin_db"
username = "mongouser"
password = "your_password"
max_pool_size = 10
connect_timeout = 10
[database.mysql]
host = "localhost"
port = 3306
database = "admin_db"
username = "root"
password = "your_password"
max_pool_size = 10
connect_timeout = 10
[redis]
host = "localhost"
port = 6379
username = "default"
password = "your_password"
database = 0
max_pool_size = 20
connect_timeout = 5
[auth]
token_secret = "change_this_to_a_strong_secret_in_production"
token_expiry_hours = 24
refresh_token_expiry_days = 7
[email]
smtp_host = "smtp.gmail.com"
smtp_port = 587
smtp_username = "your-email@gmail.com"
smtp_password = "your_app_password"
from_name = "系统通知"
from_email = "your-email@gmail.com"
enable_tls = true
[sms]
provider = "tencent"
app_id = "your_app_id"
app_key = "your_app_key"
sign_name = "您的应用"
template_id = "123456"
[sms.tencent]
sdk_app_id = "1400000000"
secret_id = "AKIDxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
secret_key = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
region = "ap-guangzhou"
[sms.aliyun]
access_key_id = "LTAI5xxxxxxxxxxxxx"
access_key_secret = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
region = "cn-hangzhou"
[verification_code]
length = 6
ttl = 300
send_interval = 60
[storage.cos]
secret_id = "AKIDxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
secret_key = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
bucket = "your-bucket-1234567890"
region = "ap-guangzhou"
cdn_domain = "cdn.example.com"
[security]
aes_key = "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"
aes_iv = "0123456789abcdef0123456789abcdef"
enable_cors = true
allowed_origins = "http://localhost:3000,https://example.com"
enable_csrf = false
[session]
secret_key = "change_this_session_secret_key_in_production"
max_age = 86400
http_only = true
secure = false
cookie_path = "/"
cookie_domain = ""
[upload]
allowed_types = "image/jpeg,image/png,image/gif,image/webp,application/pdf"
max_file_size = 10
upload_dir = "./uploads"
temp_dir = "./temp"
[rate_limit]
enabled = true
requests_per_minute = 60
burst_size = 10
[development]
enabled = false
debug = false
hot_reload = false
show_error_details = true