Skip to content

Commit

Permalink
fix(server/config): 修正 http.Trace 无法正确设置默认值的错误
Browse files Browse the repository at this point in the history
  • Loading branch information
caixw committed May 27, 2024
1 parent 9ddaaf2 commit 1166727
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion server/config/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,11 @@ func (h *httpConfig) sanitize(l *logs.Logs) *web.FieldError {
*v = header.XRequestID
}
})),
filter.New("trace", &h.Trace, filter.V(func(t string) bool {
filter.New("trace", &h.Trace, filter.S(func(t *string) {
if *t == "" {
*t = "disable"
}
}), filter.V(func(t string) bool {
switch strings.ToLower(t) {
case "body":
h.trace = web.WithTrace(true)
Expand Down
2 changes: 1 addition & 1 deletion web.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
)

// Version 当前框架的版本
const Version = "0.96.0"
const Version = "0.96.1"

type (
Logger = logs.Logger
Expand Down

0 comments on commit 1166727

Please sign in to comment.