add branch v1
This commit is contained in:
parent
5d370e1077
commit
01b8951dd5
53 changed files with 1079 additions and 6481 deletions
53
config.yaml
53
config.yaml
|
@ -1,23 +1,44 @@
|
|||
# Server Configuration
|
||||
server:
|
||||
port: 8080
|
||||
read_timeout: 15s
|
||||
write_timeout: 15s
|
||||
shutdown_timeout: 5s
|
||||
timeout: 30s
|
||||
|
||||
# Database Configuration
|
||||
database:
|
||||
driver: sqlite3
|
||||
dsn: otpm.sqlite
|
||||
max_open_conns: 25
|
||||
max_idle_conns: 25
|
||||
max_lifetime: 5m
|
||||
skip_migration: false
|
||||
driver: "sqlite3" # or "postgres"
|
||||
sqlite:
|
||||
path: "./data.db"
|
||||
postgres:
|
||||
host: "localhost"
|
||||
port: 5432
|
||||
user: "postgres"
|
||||
password: "password"
|
||||
dbname: "otpdb"
|
||||
sslmode: "disable"
|
||||
|
||||
jwt:
|
||||
secret: "your-jwt-secret-key-change-this-in-production"
|
||||
expire_delta: 24h
|
||||
refresh_delta: 168h
|
||||
signing_method: HS256
|
||||
# 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-wechat-app-id"
|
||||
app_secret: "your-wechat-app-secret"
|
||||
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"
|
Loading…
Add table
Add a link
Reference in a new issue