diff --git a/README.MD b/README.MD index a3309b7a..c985aa5e 100644 --- a/README.MD +++ b/README.MD @@ -97,8 +97,10 @@ bash ./start.sh 配置文件应为**运行目录**下的`config.yaml`文件, 使用`yaml`格式解析 例: ```yaml -# 是否打印访问信息, 默认为否 (这个选项对于压缩日志文件十分有用) -record-serve-info: false +# 是否不打印访问信息 +no-access-log: false +# 最多输出几个 1MB 的访问日志 +access-log-slots: 16 # 日志最长保存时间 (天). 设置为 0 禁用清理过期日志 log-slots: 7 # 是否禁用 bmclapi 分发的证书, 同 CLUSTER_BYOC diff --git a/config.yaml b/config.yaml index 3db3e524..5787e9ea 100644 --- a/config.yaml +++ b/config.yaml @@ -1,5 +1,6 @@ -record-serve-info: true log-slots: 7 +no-access-log: false +access-log-slots: 16 byoc: false trusted-x-forwarded-for: false public-host: "" @@ -17,6 +18,8 @@ serve-limit: upload-rate: 10240 dashboard: enable: true + username: "" + password: "" pwa-name: GoOpenBmclApi Dashboard pwa-short_name: GOBA Dash pwa-description: Go-Openbmclapi Internal Dashboard @@ -34,8 +37,10 @@ webdav-users: password: example-password advanced: debug-log: false - skip-first-sync: true - exit-when-disconnected: true noopen: false no-heavy-check: false + heavy-check-interval: 120 keepalive-timeout: 10 + skip-first-sync: false + skip-signature-check: false + exit-when-disconnected: false diff --git a/handler.go b/handler.go index afa4ebb5..5daeaa2b 100644 --- a/handler.go +++ b/handler.go @@ -99,7 +99,7 @@ type accessRecord struct { Method string `json:"method"` URI string `json:"uri"` UA string `json:"ua"` - Extra map[string]any `json:"extra"` + Extra map[string]any `json:"extra,omitempty"` } func (r *accessRecord) String() string {