Files
onix/pkg/plugin/implementation/requestPreProcessor/cmd/plugin.go
2025-03-28 17:17:55 +05:30

22 lines
519 B
Go

package main
import (
"context"
"net/http"
"strings"
requestpreprocessor "github.com/beckn/beckn-onix/pkg/plugin/implementation/requestPreProcessor"
)
type provider struct{}
func (p provider) New(ctx context.Context, c map[string]string) (func(http.Handler) http.Handler, error) {
config := &requestpreprocessor.Config{}
if contextKeysStr, ok := c["ContextKeys"]; ok {
config.ContextKeys = strings.Split(contextKeysStr, ",")
}
return requestpreprocessor.NewUUIDSetter(config)
}
var Provider = provider{}