From 159ff956d3a48edc66399afa4b0517a91061dc9f Mon Sep 17 00:00:00 2001 From: tanyamadaan Date: Thu, 3 Apr 2025 16:18:26 +0530 Subject: [PATCH] Bug Fix for ReqPreProcessor plugin --- .../implementation/reqpreprocessor/reqpreprocessor.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pkg/plugin/implementation/reqpreprocessor/reqpreprocessor.go b/pkg/plugin/implementation/reqpreprocessor/reqpreprocessor.go index f687b8a..6d30c38 100644 --- a/pkg/plugin/implementation/reqpreprocessor/reqpreprocessor.go +++ b/pkg/plugin/implementation/reqpreprocessor/reqpreprocessor.go @@ -16,8 +16,12 @@ type Config struct { Role string } -const contextKey = "context" -const subscriberIDKey = "subscriber_id" +type keyType string + +const ( + contextKey keyType = "context" + subscriberIDKey keyType = "subscriber_id" +) func NewPreProcessor(cfg *Config) (func(http.Handler) http.Handler, error) { if err := validateConfig(cfg); err != nil {