37 lines
830 B
YAML
37 lines
830 B
YAML
# 应用版本
|
|
version: {{ .Version }}
|
|
|
|
# 应用配置
|
|
app:
|
|
# 域名或IP
|
|
host: 0.0.0.0
|
|
# 端口
|
|
port: 7899
|
|
|
|
# 安全
|
|
security:
|
|
jwt:
|
|
# Token过期时间 (默认4小时)
|
|
expire: 14400
|
|
# Refresh Token过期时间 (默认24小时)
|
|
refresh-expire: 86400
|
|
# 请确保签名密钥安全性足够高,建议使用高强度随机字符串
|
|
secret: {{ .Security.Jwt.Secret }}
|
|
# 允许额外的跨域请求
|
|
allow-CORS:
|
|
- "*"
|
|
|
|
# 数据库配置
|
|
database:
|
|
driver: sqlite3
|
|
dsn: file:drivelinked.db?cache=shared&mode=rwc
|
|
# DSN references
|
|
# sqlite3 https://github.com/mattn/go-sqlite3#dsn-examples
|
|
# mysql https://github.com/go-sql-driver/mysql#dsn-data-source-name
|
|
# postgres https://github.com/lib/pq
|
|
|
|
# with unit second
|
|
max-idle-conns: 20
|
|
max-open-conns: 50
|
|
conn-max-life-time: 30
|