[feature] Make client IP logging configurable (#1799)

This commit is contained in:
Daenney
2023-05-21 17:12:47 +02:00
committed by GitHub
parent 68e54cbaa4
commit 107237c8e8
9 changed files with 40 additions and 12 deletions

View File

@@ -34,7 +34,7 @@ func init() {
}
return kvs
})
// Client IP middleware hook.
// Public Key ID middleware hook.
log.Hook(func(ctx context.Context, kvs []kv.Field) []kv.Field {
if id := PublicKeyID(ctx); id != "" {
return append(kvs, kv.Field{K: "pubKeyID", V: id})