Files
blog-server/example.yaml
2026-08-19 22:05:49 +08:00

45 lines
1.0 KiB
YAML
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

server:
port: 8080
host: 127.0.0.1
# 是否运行在受信反向代理后true 才信任 X-Forwarded-For/X-Real-IP否则忽略防伪造
trust_proxy: false
database:
host: db_host
port: db_port
user: postgres
password: db_password
dbname: db_name
sslMode: disable
redis:
addr: host:port
password: redis_password
db: 0
key_prefix: ""
jwt:
secret: ""
signing_method: HS256
expire: 30m
refresh_expire: 720h
issuer:
audience:
token_header: Authorization
token_prefix: "Bearer "
cookie_name: "rt"
file:
base_url: http://127.0.0.1:8080/static/ #静态文件目录 用于本地访问开放静态资源
upload_dir: "uploads"
max_upload_size: 10485760 # 10MB
log:
level: debug # debug / info / warn / error
filename: logs/app.log
max_size: 100 # 单个文件最大 MB
max_backups: 30 # 最多保留旧文件个数
max_age: 30 # 最多保留天数
compress: true # 是否压缩旧日志
console: true # 是否同时输出到控制台