Bug Fix for ReqPreProcessor plugin

This commit is contained in:
tanyamadaan
2025-04-03 16:08:57 +05:30
parent 7ea369f3bb
commit 87329bfb9d
4 changed files with 140 additions and 77 deletions

View File

@@ -3,7 +3,6 @@ package main
import (
"context"
"net/http"
"strings"
"github.com/beckn/beckn-onix/pkg/plugin/implementation/reqpreprocessor"
)
@@ -12,9 +11,6 @@ type provider struct{}
func (p provider) New(ctx context.Context, c map[string]string) (func(http.Handler) http.Handler, error) {
config := &reqpreprocessor.Config{}
if contextKeysStr, ok := c["contextKeys"]; ok {
config.ContextKeys = strings.Split(contextKeysStr, ",")
}
if role, ok := c["role"]; ok {
config.Role = role
}