mirror of
https://github.com/EZ-Api/ez-api.git
synced 2026-01-13 17:47:51 +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:
@@ -14,10 +14,11 @@ import (
|
||||
|
||||
const featuresKey = "meta:features"
|
||||
const (
|
||||
logRetentionFeatureKey = "log_retention_days"
|
||||
logMaxRecordsFeatureKey = "log_max_records"
|
||||
logRetentionRedisKey = "meta:log:retention_days"
|
||||
logMaxRecordsRedisKey = "meta:log:max_records"
|
||||
logRetentionFeatureKey = "log_retention_days"
|
||||
logMaxRecordsFeatureKey = "log_max_records"
|
||||
logRequestBodyFeatureKey = "log_request_body_enabled"
|
||||
logRetentionRedisKey = "meta:log:retention_days"
|
||||
logMaxRecordsRedisKey = "meta:log:max_records"
|
||||
)
|
||||
|
||||
// FeatureHandler manages lightweight feature flags stored in Redis for DP/CP runtime toggles.
|
||||
|
||||
Reference in New Issue
Block a user