otpm/config/config.yaml
“xHuPo” 10ebc59ffb fix api
2025-06-17 14:46:09 +08:00

44 lines
No EOL
879 B
YAML

# Server Configuration
server:
port: 8080
timeout: 30s
# Database Configuration
database:
driver: "sqlite3" # or "postgres"
sqlite:
path: "./data.db"
postgres:
host: "localhost"
port: 5432
user: "postgres"
password: "password"
dbname: "otpdb"
sslmode: "disable"
# Security Configuration
security:
encryption_key: "12345678901234567890123456789012"
jwt_signing_key: "jwt_secret_key_for_authentication_12345"
token_expiry: 24h
refresh_token_expiry: 168h # 7 days
# WeChat Configuration
wechat:
app_id: "wx57d1033974eb5250"
app_secret: "be494c2a81df685a40b9a74e1736b15d"
# CORS Configuration
cors:
allowed_origins:
- "http://localhost:8080"
- "https://yourdomain.com"
allowed_methods:
- "GET"
- "POST"
- "PUT"
- "DELETE"
- "OPTIONS"
allowed_headers:
- "Authorization"
- "Content-Type"