fix api
This commit is contained in:
parent
01b8951dd5
commit
10ebc59ffb
17 changed files with 1087 additions and 238 deletions
44
config/config.yaml
Normal file
44
config/config.yaml
Normal file
|
@ -0,0 +1,44 @@
|
|||
# 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"
|
Loading…
Add table
Add a link
Reference in a new issue