mirror of
https://github.com/EZ-Api/ez-api.git
synced 2026-01-14 01:37:52 +00:00
feat(api): add log_request_body_enabled feature flag support
Add runtime feature flag to control whether request bodies are stored in logs. The Handler now accepts a Redis client to check the log_request_body_enabled feature flag before persisting log records. - Add logRequestBodyFeatureKey constant for feature flag - Inject Redis client into Handler for feature flag lookups - Strip request body from log records when feature is disabled - Update tests to pass Redis client to NewHandler
This commit is contained in:
@@ -36,7 +36,7 @@ func newTestHandler(t *testing.T) (*Handler, *gorm.DB) {
|
||||
rdb := redis.NewClient(&redis.Options{Addr: mr.Addr()})
|
||||
sync := service.NewSyncService(rdb)
|
||||
|
||||
return NewHandler(db, sync, nil), db
|
||||
return NewHandler(db, sync, nil, rdb), db
|
||||
}
|
||||
|
||||
func TestCreateProvider_DefaultsVertexLocationGlobal(t *testing.T) {
|
||||
|
||||
Reference in New Issue
Block a user