This repository has been archived on 2026-06-21. You can view files and clone it, but cannot push or open issues or pull requests.
Files
MetaLab/config.yaml
Victor_Jay d29d388092 docs: 新增站点设置管理文档,移除 JS 死代码,同步 config.yaml 注释
- 新增 docs/site-settings.md:站点设置全量文档(可配置项/架构/权限/API)
- config.yaml 补充 site.* / registration.* 运行时配置说明
- site-settings.js 移除已废弃的 site.brand 过滤项
2026-05-27 15:52:56 +08:00

56 lines
1.7 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.

# MetaZone.FAN 默认配置
# 敏感值通过环境变量或 .env 覆盖
server:
port: 8080
mode: debug # debug | release | test
database:
host: 127.0.0.1
port: 5432
user: metazone
password: "" # 敏感值由 .env 注入
dbname: metalab_dev
sslmode: disable
jwt:
secret: "" # 生产环境通过 JWT_SECRET 环境变量或 .env 注入
access_expire: 15 # 分钟
refresh_expire: 168 # 小时 (7 天)
remember_expire: 720 # 小时 (30 天)
bcrypt:
cost: 12
# 站点设置(运行时通过管理后台 /admin/site-settings 配置DB持久化+内存缓存,无需重启)
# site.framework 页脚附加标识,默认 "Framework: MetaZone",留空则隐藏
# site.copyright_start 版权起始年,默认 "2024"
# registration.enabled 是否允许新用户注册,默认 true
# audit.* 审核系统配置,可运行时覆盖本文件默认值
audit:
enabled: true # 审核总开关
username_audit: true # 用户名修改审核
avatar_audit: true # 头像修改审核
bio_audit: true # 个性签名审核
# 角色配置(可扩展,无需修改源代码)
roles:
# 角色层级(数字越大权限越高)
levels:
user: 0
moderator: 1
admin: 2
owner: 3
# 角色显示名称
names:
user: "普通用户"
moderator: "版主"
admin: "管理员"
owner: "站长"
# 角色权限规则
permissions:
# 可操作的目标角色(未在此列出的角色默认可操作所有角色)
operable_roles:
admin: ["user"]
moderator: ["user"]