44 lines
No EOL
839 B
YAML
44 lines
No EOL
839 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: "your-32-byte-encryption-key-here"
|
|
jwt_signing_key: "your-jwt-signing-key-here"
|
|
token_expiry: 24h
|
|
refresh_token_expiry: 168h # 7 days
|
|
|
|
# WeChat Configuration
|
|
wechat:
|
|
app_id: "YOUR_APPID"
|
|
app_secret: "YOUR_APPSECRET"
|
|
|
|
# CORS Configuration
|
|
cors:
|
|
allowed_origins:
|
|
- "http://localhost:8080"
|
|
- "https://yourdomain.com"
|
|
allowed_methods:
|
|
- "GET"
|
|
- "POST"
|
|
- "PUT"
|
|
- "DELETE"
|
|
- "OPTIONS"
|
|
allowed_headers:
|
|
- "Authorization"
|
|
- "Content-Type" |