From c4d46b935f1bb379977495ab9db371dcab72e646 Mon Sep 17 00:00:00 2001 From: Dries De Peuter Date: Mon, 8 Apr 2024 00:30:39 +0200 Subject: [PATCH] fix: Use name without json --- server/wellknown.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server/wellknown.go b/server/wellknown.go index cd297aa..8eefca0 100644 --- a/server/wellknown.go +++ b/server/wellknown.go @@ -4,6 +4,7 @@ import ( "context" "encoding/json" "os" + "strings" "time" "github.com/bep/debounce" @@ -51,7 +52,7 @@ func (s *WellKnownService) GetData(ctx context.Context) (*wkRegistry, error) { if err := json.Unmarshal([]byte(data), &d); err != nil { klog.Error(err) } - reg[name] = d + reg[strings.TrimSuffix(name, ".json")] = d } return ®, nil